diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/math.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index f619240c5..4775b505d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-29 Peter Stephenson <pws@csr.com> + + * 20592: Src/math.c: $((##)) caused mayhem by passing null + string to getkeystring(). Report error instead. + 2004-11-24 Clint Adams <clint@zsh.org> * 20583: Completion/Unix/Command/_ssh: complete "modern" options diff --git a/Src/math.c b/Src/math.c index ce316414e..acf7bdd11 100644 --- a/Src/math.c +++ b/Src/math.c @@ -451,6 +451,10 @@ zzlex(void) int v; ptr++; + if (!*ptr) { + zerr("character missing after ##", NULL, 0); + return EOI; + } ptr = getkeystring(ptr, NULL, 6, &v); yyval.u.l = v; return NUM; |