From f428c2cc6f3de4d88333ca3faf7ffb3ac6fe9ac1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 21 Feb 2020 09:09:29 -0800 Subject: mkflags: fix a sscanf buffer off-by-one. Sadly, the compilers don't even catch this common mistake if you use sscanf_s(3). Luckily, ASan does. --- scripts/mkflags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/mkflags.c') diff --git a/scripts/mkflags.c b/scripts/mkflags.c index 93294884..76827e0f 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -154,7 +154,7 @@ void octane(char *from) int main(int argc, char *argv[]) { - char command[256], flags[1023], allflags[1024]; + char command[256], flags[1024], allflags[1024]; char *out, *outbuf = malloc(1024*1024); // Yes, the output buffer is 1 megabyte with no bounds checking. -- cgit v1.2.3