Commit Diff


commit - 9fc4efff71ba54d571f1fdb48747539463d2a651
commit + 0e10c6cfa04cb69c087f82ab141613adeb98e4f9
blob - 0fdf90a0570b49ea4807e50781f29e6c4ba727f6
blob + 445e57d5cea642f9e3bbc3562cd396ddb8f4442f
--- FICS/network.c
+++ FICS/network.c
@@ -371,7 +371,7 @@ readline2(comstr_t *cs, int who)
 	if (con[who].processed)
 		s += v_pending;
 	else {
-		if (bytes_received + v_pending > INT_MAX)
+		if (bytes_received > INT_MAX - v_pending)
 			errx(1, "%s: integer overflow", __func__);
 		bytes_received += v_pending;
 	}