diff options
author | onetrueawk <bwkster@gmail.com> | 2019-01-21 14:02:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 14:02:18 -0500 |
commit | 611f775d8d48337cfc2b9f8686045984c859c3ed (patch) | |
tree | a8db46a4d12eb201e7a87aa47f3028d7d64cf249 /bugs-fixed | |
parent | e059b3b197ce7da33b8b0b3529af65fb85b25186 (diff) | |
parent | 40b9214d2a2098c6c8e76a85e6eedc990ca4d73f (diff) | |
download | one-true-awk-611f775d8d48337cfc2b9f8686045984c859c3ed.tar.gz |
Merge branch 'master' into fmt-overflow
Diffstat (limited to 'bugs-fixed')
-rw-r--r-- | bugs-fixed/README | 7 | ||||
-rw-r--r-- | bugs-fixed/missing-precision.awk | 1 | ||||
-rw-r--r-- | bugs-fixed/missing-precision.ok | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/bugs-fixed/README b/bugs-fixed/README index 7c18979..51e8a4e 100644 --- a/bugs-fixed/README +++ b/bugs-fixed/README @@ -24,6 +24,11 @@ and also if CONVFMT changed. 7. unary-plus: Unary plus on a string constant returned the string. Instead, it should convert the value to numeric and give that value. -X. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written +8. missing-precision: When using the format string "%*s", the precision +argument was used without checking if it was present first. + +9. fmt-overflow: The buffer used for OFMT/CONVFMT conversions was written to with sprintf(), which meant that some conversions could write past the end. + + diff --git a/bugs-fixed/missing-precision.awk b/bugs-fixed/missing-precision.awk new file mode 100644 index 0000000..4e7a74b --- /dev/null +++ b/bugs-fixed/missing-precision.awk @@ -0,0 +1 @@ +BEGIN { printf("%*s"); } diff --git a/bugs-fixed/missing-precision.ok b/bugs-fixed/missing-precision.ok new file mode 100644 index 0000000..608b4fa --- /dev/null +++ b/bugs-fixed/missing-precision.ok @@ -0,0 +1,2 @@ +./a.out: not enough args in printf(%*s) + source line number 1 |