aboutsummaryrefslogtreecommitdiff
path: root/bugs-fixed
diff options
context:
space:
mode:
authoronetrueawk <bwkster@gmail.com>2019-01-21 14:08:25 -0500
committerGitHub <noreply@github.com>2019-01-21 14:08:25 -0500
commit8dfde739e99869fab11fdee14b5d3e3c1cd4315d (patch)
treecbc4b01826d2f417bf834ef6a1a9d4ae53f2a7a3 /bugs-fixed
parentd45db5e9d802659e8e4ba3457c1f354fa99b18d2 (diff)
parent294f4c0db5ed292a30959cb6b1c346f573083c62 (diff)
downloadone-true-awk-8dfde739e99869fab11fdee14b5d3e3c1cd4315d.tar.gz
Merge branch 'master' into split-fs-from-array
Diffstat (limited to 'bugs-fixed')
-rw-r--r--bugs-fixed/README9
-rw-r--r--bugs-fixed/fmt-overflow.awk1
-rw-r--r--bugs-fixed/fmt-overflow.ok1
-rw-r--r--bugs-fixed/missing-precision.awk1
-rw-r--r--bugs-fixed/missing-precision.ok2
5 files changed, 14 insertions, 0 deletions
diff --git a/bugs-fixed/README b/bugs-fixed/README
index 7a9e2c1..1e1bdbe 100644
--- a/bugs-fixed/README
+++ b/bugs-fixed/README
@@ -24,7 +24,16 @@ 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.
+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.
+
X. split-fs-from-array: If the third argument to split() comes from the
array passed as the second argument, then split() would previously read
from the freed memory and possibly produce incorrect results (depending
on the system's malloc()/free() behaviour.)
+
+
diff --git a/bugs-fixed/fmt-overflow.awk b/bugs-fixed/fmt-overflow.awk
new file mode 100644
index 0000000..bf5877e
--- /dev/null
+++ b/bugs-fixed/fmt-overflow.awk
@@ -0,0 +1 @@
+BEGIN { OFMT = "%.1000f"; print 1.25; }
diff --git a/bugs-fixed/fmt-overflow.ok b/bugs-fixed/fmt-overflow.ok
new file mode 100644
index 0000000..5f7449e
--- /dev/null
+++ b/bugs-fixed/fmt-overflow.ok
@@ -0,0 +1 @@
+1.2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
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