diff options
| author | Serge Tupchii | 2020-12-08 21:22:34 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-12-08 21:22:34 +0100 |
| commit | 2d8f0364fcd1d5dad2b82dd3a9af870b03854547 (patch) | |
| tree | c16890055bafe5d0555f1fda325ae3372c9e66bd /lib-src | |
| parent | 1fb099ceb0269e8e74bd0f8dc98eb1da156becbd (diff) | |
| download | emacs-2d8f0364fcd1d5dad2b82dd3a9af870b03854547.tar.gz emacs-2d8f0364fcd1d5dad2b82dd3a9af870b03854547.zip | |
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
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 1 |
1 files changed, 1 insertions, 0 deletions
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) | |||
| 6063 | { | 6063 | { |
| 6064 | free (last); | 6064 | free (last); |
| 6065 | last = NULL; | 6065 | last = NULL; |
| 6066 | allocated = lastlen = 0; | ||
| 6066 | } | 6067 | } |
| 6067 | } | 6068 | } |
| 6068 | else | 6069 | else |