From 2b9e15920be73afbbb4d5cc5792ff4717176f661 Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Fri, 23 Aug 2019 00:40:41 +0300 Subject: [PATCH] Fix off-by-one error --- c/ios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c/ios.c b/c/ios.c index 1ad7a9b..01fa0c9 100644 --- a/c/ios.c +++ b/c/ios.c @@ -1014,7 +1014,7 @@ int ios_printf(struct ios *s, const char *format, ...) if (len < 0) { len = 0; } - if (len > (int)sizeof(purkka)) { + if (len >= (int)sizeof(purkka)) { lerror(MemoryError, "out of memory in ios_printf buffer"); } ios_write(s, purkka, len);