[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-766
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-766-gb90d6ab |
Date: |
Wed, 28 Oct 2015 19:21:37 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.1-stable has been updated
via b90d6abb81f54bec11305d5091532c8d5fc47a18 (commit)
from 49f7063d1efbba3f7a1c8d3e35b4a0f2f3395978 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=b90d6abb81f54bec11305d5091532c8d5fc47a18
commit b90d6abb81f54bec11305d5091532c8d5fc47a18
Author: Arnold D. Robbins <address@hidden>
Date: Wed Oct 28 21:21:05 2015 +0200
Disallow nul bytes in source code no matter what.
diff --git a/ChangeLog b/ChangeLog
index d215340..04dbb42 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-28 Arnold D. Robbins <address@hidden>
+
+ * awkgram.y (nextc): Don't allow '\0' even if check_for_bad
+ is false. Fixes a problem reported by Hanno Boeck <address@hidden>.
+
2015-10-16 Arnold D. Robbins <address@hidden>
* Makefile.am (SUBDIRS): Fix ordering so that
diff --git a/awkgram.c b/awkgram.c
index 845dbbe..8e408ca 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5226,7 +5226,7 @@ again:
0 : work_ring_idx + 1;
cur_char_ring[work_ring_idx] = 0;
}
- if (check_for_bad)
+ if (check_for_bad || *lexptr == '\0')
check_bad_char(*lexptr);
return (int) (unsigned char) *lexptr++;
@@ -5235,7 +5235,7 @@ again:
if (lexeof)
return END_FILE;
if (lexptr && lexptr < lexend) {
- if (check_for_bad)
+ if (check_for_bad || *lexptr == '\0')
check_bad_char(*lexptr);
return ((int) (unsigned char) *lexptr++);
}
diff --git a/awkgram.y b/awkgram.y
index 1177160..2592d13 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -2887,7 +2887,7 @@ again:
0 : work_ring_idx + 1;
cur_char_ring[work_ring_idx] = 0;
}
- if (check_for_bad)
+ if (check_for_bad || *lexptr == '\0')
check_bad_char(*lexptr);
return (int) (unsigned char) *lexptr++;
@@ -2896,7 +2896,7 @@ again:
if (lexeof)
return END_FILE;
if (lexptr && lexptr < lexend) {
- if (check_for_bad)
+ if (check_for_bad || *lexptr == '\0')
check_bad_char(*lexptr);
return ((int) (unsigned char) *lexptr++);
}
diff --git a/test/ChangeLog b/test/ChangeLog
index 6a88849..83174b0 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-28 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (nulinsrc): New test.
+ * nulinsrc.awk, nulinsrc.ok: New files.
+
2015-10-26 Arnold D. Robbins <address@hidden>
* id.awk: Sort the output. Helps on z/OS.
diff --git a/test/Makefile.am b/test/Makefile.am
index 0d8658a..97cf8d5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -627,6 +627,8 @@ EXTRA_DIST = \
noparms.ok \
nors.in \
nors.ok \
+ nulinsrc.awk \
+ nulinsrc.ok \
nulrsend.awk \
nulrsend.in \
nulrsend.ok \
@@ -1040,7 +1042,7 @@ BASIC_TESTS = \
manglprm math membug1 messages minusstr mmap8k mtchi18n \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep
\
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \
- noparms nors nulrsend numindex numsubstr \
+ noparms nors nulinsrc nulrsend numindex numsubstr \
octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \
paramasfunc1 paramasfunc2 \
paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
diff --git a/test/Makefile.in b/test/Makefile.in
index 7917fc2..90b994c 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -884,6 +884,8 @@ EXTRA_DIST = \
noparms.ok \
nors.in \
nors.ok \
+ nulinsrc.awk \
+ nulinsrc.ok \
nulrsend.awk \
nulrsend.in \
nulrsend.ok \
@@ -1296,7 +1298,7 @@ BASIC_TESTS = \
manglprm math membug1 messages minusstr mmap8k mtchi18n \
nasty nasty2 negexp negrange nested nfldstr nfloop nfneg nfset nlfldsep
\
nlinstr nlstrina noeffect nofile nofmtch noloop1 noloop2 nonl \
- noparms nors nulrsend numindex numsubstr \
+ noparms nors nulinsrc nulrsend numindex numsubstr \
octsub ofmt ofmta ofmtbig ofmtfidl ofmts ofs1 onlynl opasnidx opasnslf \
paramasfunc1 paramasfunc2 \
paramdup paramres paramtyp paramuninitglobal parse1 parsefld parseme \
@@ -3089,6 +3091,11 @@ noparms:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+nulinsrc:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
nulrsend:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 1723c33..bb5712d 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -550,6 +550,11 @@ noparms:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+nulinsrc:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
nulrsend:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/nulinsrc.awk b/test/nulinsrc.awk
new file mode 100644
index 0000000..aecda86
Binary files /dev/null and b/test/nulinsrc.awk differ
diff --git a/test/nulinsrc.ok b/test/nulinsrc.ok
new file mode 100644
index 0000000..515f423
--- /dev/null
+++ b/test/nulinsrc.ok
@@ -0,0 +1,2 @@
+gawk: nulinsrc.awk:1: fatal: PEBKAC error: invalid character '\000' in source
code
+EXIT CODE: 2
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
awkgram.c | 4 ++--
awkgram.y | 4 ++--
test/ChangeLog | 5 +++++
test/Makefile.am | 4 +++-
test/Makefile.in | 9 ++++++++-
test/Maketests | 5 +++++
test/nulinsrc.awk | Bin 0 -> 3 bytes
test/nulinsrc.ok | 2 ++
9 files changed, 32 insertions(+), 6 deletions(-)
create mode 100644 test/nulinsrc.awk
create mode 100644 test/nulinsrc.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-766-gb90d6ab,
Arnold Robbins <=