From 74159c64da26d7f2509bb49f09be321f62385f54 Mon Sep 17 00:00:00 2001 From: Danek Duvall Date: Fri, 13 Jun 2014 15:15:12 -0700 Subject: [PATCH] Fix a potential buffer overrun from an off-by-one error. --- net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2