aboutsummaryrefslogtreecommitdiff
path: root/misc-utils
diff options
context:
space:
mode:
authorRalph Siemsen <ralph.siemsen@linaro.org>2021-12-02 09:45:18 -0500
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-12-06 01:47:07 +0100
commit5a71d0079629a3a81ab52ff2c05e13380946c369 (patch)
tree7c3b6924bb48f83d82fc6d8b4b411fbf00f258ed /misc-utils
parent981d198cfc3545bb8226c336fdf001f067468e19 (diff)
fectest.c: fix buffer overrun
misc-utils/fectest.c:37:11: warning: iteration 47 invokes undefined behavior [-Waggressive-loop-optimizations] 37 | srcs[i] = buf + (i * PKT_SIZE); | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Ralph Siemsen <ralph.siemsen@linaro.org> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/fectest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc-utils/fectest.c b/misc-utils/fectest.c
index fcba513..eb1d33e 100644
--- a/misc-utils/fectest.c
+++ b/misc-utils/fectest.c
@@ -21,7 +21,7 @@ int main(void)
unsigned char buf[NR_PKTS * PKT_SIZE];
unsigned char pktbuf[(NR_PKTS + DROPS) * PKT_SIZE];
struct fec_parms *fec;
- unsigned char *srcs[NR_PKTS];
+ unsigned char *srcs[NR_PKTS + DROPS];
unsigned char *pkt[NR_PKTS + DROPS];
int pktnr[NR_PKTS + DROPS];
struct timeval then, now;