[prev in list] [next in list] [prev in thread] [next in thread] 

List:       varnish-commit
Subject:    [master] 4c987be0d Declare variable length of struct vpx_tlv
From:       Nils Goroll <nils.goroll () uplex ! de>
Date:       2020-12-29 10:07:08
Message-ID: 20201229100708.7DCD3B1B9A () lists ! varnish-cache ! org
[Download RAW message or body]


commit 4c987be0d564d8c1f464f02ec4b60a91aec6b135
Author: Nils Goroll <nils.goroll@uplex.de>
Date:   Tue Dec 29 10:59:56 2020 +0100

    Declare variable length of struct vpx_tlv
    
    3a5af972189b12bb7e16f529e651fb34834c4ceb enabled flexelint to complain
    about copying many bytes into a struct member declared as a
    single byte array (which it never was).
    
    warning addressed:
    
    proxy/cache_proxy_proto.c  469  Warning 669: Possible data overrun for
    function
        'memcpy(void *, const void *, unsigned long)', argument 3 (size=988)
        exceeds argument 1 (size=1) [Reference: file proxy/cache_proxy_proto.c:
        lines 340, 348, 392, 401, 410, 439, 469]

diff --git a/bin/varnishd/proxy/cache_proxy_proto.c b/bin/varnishd/proxy/cache_proxy_proto.c
index b468c09d8..7d6cffe00 100644
--- a/bin/varnishd/proxy/cache_proxy_proto.c
+++ b/bin/varnishd/proxy/cache_proxy_proto.c
@@ -52,7 +52,7 @@ struct vpx_tlv {
 	unsigned		magic;
 #define VPX_TLV_MAGIC		0xdeb9a4a5
 	unsigned		len;
-	char			tlv[1];
+	char			tlv[];
 };
 
 static inline int
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic