authorSergey Poznyakoff <>2016-03-12 15:54:57 (GMT)
committer Sergey Poznyakoff <>2016-03-12 15:55:30 (GMT)
commit9d9f34d1ef0483fc012ea283e649d507ff410638 (patch) (side-by-side diff)
parent06bf9bbf7922322d770a032aa9c8f9d3725984bd (diff)
Fix NULL dereferencing.
The bug was triggered by invoking symtab_remove with the name that has not yet been entered into the symtab. Reported by Julian Sternberg. * src/variable.c (symtab_remove): Return ENOENT if no matching entry was found.
Diffstat (more/less context) (ignore whitespace changes)
1 files changed, 3 insertions, 0 deletions
diff --git a/src/variable.c b/src/variable.c
index 333daeb..8e75ea2 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -174,2 +174,5 @@ symtab_remove(struct symtab *st, const char *name)
+ if (!entry)
+ return ENOENT;

Return to:

Send suggestions and report system problems to the System administrator.