[master] b6d062455 silence flexelint
Nils Goroll
nils.goroll at uplex.de
Mon Nov 23 11:14:15 UTC 2020
commit b6d062455bcb4b4c8bf972b90d9a252e6dcf23fb
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Mon Nov 23 11:57:17 2020 +0100
silence flexelint
Dridi, phk and myself all stared at this piece of code and see no issue:
res has been calloc'ed l elements. For any res[i] and res[j] access, i
and j are less than l, respectively. l is not increased after the
initial count of elements in s.
Ref 9947307d357247823bd8b48f034f5b3d253e6664
Flexelint error:
_
res[i] = vp;
mgt/mgt_vcl.c 749 Warning 661: Possible access of out-of-bounds
pointer (1 beyond end of data) by operator '[' [Reference:
file mgt/mgt_vcl.c: lines 719, 722, 727, 744, 747, 749]
mgt/mgt_vcl.c 719 Info 831: Reference cited in prior message
mgt/mgt_vcl.c 722 Info 831: Reference cited in prior message
mgt/mgt_vcl.c 727 Info 831: Reference cited in prior message
mgt/mgt_vcl.c 744 Info 831: Reference cited in prior message
mgt/mgt_vcl.c 747 Info 831: Reference cited in prior message
mgt/mgt_vcl.c 749 Info 831: Reference cited in prior message
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 4eb713320..ab635d7fc 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -746,6 +746,7 @@ mgt_vcl_discard_depcheck(struct cli *cli, const char * const *names,
break;
if (j < i)
continue; /* skip duplicates */
+ //lint -e{661}
res[i] = vp;
}
More information about the varnish-commit
mailing list