From: Serge Tupchii Date: Tue, 8 Dec 2020 20:22:34 +0000 (+0100) Subject: Fix crash (segfault) in etags on generating tags for Erlang files X-Git-Tag: emacs-28.0.90~4846 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2d8f0364fcd1d5dad2b82dd3a9af870b03854547;p=emacs.git Fix crash (segfault) in etags on generating tags for Erlang files * lib-src/etags.c: Set allocated and lastlen to zero, after freeing last ptr in Erlang_functions to prevent dereferencing NULL pointer (bug#45122). Copyright-paperwork-exempt: yes --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 4315771a496..a1c6837e880 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -6063,6 +6063,7 @@ Erlang_functions (FILE *inf) { free (last); last = NULL; + allocated = lastlen = 0; } } else