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
This commit is contained in:
Serge Tupchii 2020-12-08 21:22:34 +01:00 committed by Lars Ingebrigtsen
parent 1fb099ceb0
commit 2d8f0364fc

View file

@ -6063,6 +6063,7 @@ Erlang_functions (FILE *inf)
{
free (last);
last = NULL;
allocated = lastlen = 0;
}
}
else