aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-10-28 21:21:05 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-10-28 21:21:05 +0200
commitb90d6abb81f54bec11305d5091532c8d5fc47a18 (patch)
treeaa38d6f17e53cb30cd63484a720851c17195c976 /awkgram.c
parent49f7063d1efbba3f7a1c8d3e35b4a0f2f3395978 (diff)
downloadegawk-b90d6abb81f54bec11305d5091532c8d5fc47a18.tar.gz
egawk-b90d6abb81f54bec11305d5091532c8d5fc47a18.tar.bz2
egawk-b90d6abb81f54bec11305d5091532c8d5fc47a18.zip
Disallow nul bytes in source code no matter what.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/awkgram.c b/awkgram.c
index 845dbbef..8e408cac 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++);
}