From: Danek Duvall Date: Fri, 13 Jun 2014 22:15:12 +0000 (-0700) Subject: Fix a potential buffer overrun from an off-by-one error. X-Git-Tag: v0.86~15^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F46%2Fhead;p=thirdparty%2Fmtr.git Fix a potential buffer overrun from an off-by-one error. --- diff --git a/net.c b/net.c index d648804..0721ad7 100644 --- 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;