diff options
author | Elliott Hughes <enh@google.com> | 2020-02-21 09:09:29 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-02-22 06:08:07 -0600 |
commit | f428c2cc6f3de4d88333ca3faf7ffb3ac6fe9ac1 (patch) | |
tree | 2a2b28a190248c8935b602a65d802411b3f02c05 /scripts | |
parent | efe73887bbdddc21a3b18cb554575541c077d61a (diff) | |
download | toybox-f428c2cc6f3de4d88333ca3faf7ffb3ac6fe9ac1.tar.gz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mkflags.c | 2 |
1 files changed, 1 insertions, 1 deletions
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. |