[master] 4c987be0d Declare variable length of struct vpx_tlv
Nils Goroll
nils.goroll at uplex.de
Tue Dec 29 10:07:08 UTC 2020
commit 4c987be0d564d8c1f464f02ec4b60a91aec6b135
Author: Nils Goroll <nils.goroll at 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
More information about the varnish-commit
mailing list