]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
Fix a potential buffer overrun from an off-by-one error. 46/head
authorDanek Duvall <danek.duvall@oracle.com>
Fri, 13 Jun 2014 22:15:12 +0000 (15:15 -0700)
committerDanek Duvall <danek.duvall@oracle.com>
Fri, 13 Jun 2014 22:15:12 +0000 (15:15 -0700)
net.c

diff --git a/net.c b/net.c
index d648804d009ce18ec6d0d4d956fcedafce2bb9f5..0721ad71764e7546fd81ca7c742e3a0b63d95618 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1393,7 +1393,7 @@ void net_save_return(int at, int seq, int ms)
 {
   int idx;
   idx = seq - host[at].saved_seq_offset;
-  if (idx < 0 || idx > SAVED_PINGS) {
+  if (idx < 0 || idx >= SAVED_PINGS) {
     return;
   }
   host[at].saved[idx] = ms;