tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 21d4785b9af24255b41792db16ede0a2955f0b7e
parent a9f86c70e9ff1f85d298af89886b16335e964e28
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Tue,  1 Oct 2019 00:03:01 -0700

Fix possible seg fault in read_sym

Diffstat:
tisp.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tisp.c b/tisp.c @@ -545,7 +545,7 @@ read_sym(Env env, Str str) int n = 1; int i = 0; char *sym = emalloc(n); - for (; issym(*str->d); str->d++) { + for (; *str->d && issym(*str->d); str->d++) { sym[i++] = *str->d; if (i == n) { n *= 2;