path: root/src
authorSergey Poznyakoff <>2016-03-12 15:58:44 (GMT)
committer Sergey Poznyakoff <>2016-03-12 15:58:44 (GMT)
commit6669c8843b3cad84d4de63584b2675bc1b1c8ef5 (patch) (side-by-side diff)
tree2160654492eed8ffdcf41981d6c5b184424dfe12 /src
parent2dbad2727f1d00b223353965b326cfffa96fc776 (diff)
Prevent NULL dereferencing when attempting to remove an unexistent symtab entry.
* src/symtab.c (grecs_symtab_remove): Return if no matching entry was found.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
1 files changed, 3 insertions, 0 deletions
diff --git a/src/symtab.c b/src/symtab.c
index 652f859..d3fdf1d 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -228,6 +228,9 @@ grecs_symtab_remove(struct grecs_symtab *st, void *elt)
return ENOENT;
+ if (!entry)
+ return ENOENT;
syment_free(st, entry);
for (;;) {

Return to:

Send suggestions and report system problems to the System administrator.