diff options
author | Niclas Zeising <zeising@daemonic.se> | 2019-09-11 22:30:16 +0200 |
---|---|---|
committer | Niclas Zeising <zeising@daemonic.se> | 2019-09-11 22:30:16 +0200 |
commit | 420fa2a8a4dd7294d0b23696103d7887ae570e43 (patch) | |
tree | dff3799d8b09e5e58695b1cc1ababd4e7196e5a6 /lisp/struct.h | |
parent | abbacff9e01616f08c469637fa24132e151446f9 (diff) |
Fix segfault when tags file isn't found
Fix a segfault when the tags file isn't found. xedit tries to construct
a path to the tags file (by defailt ${HOME}/tags), using amongst other
things basename(3). However, basename is called with an immutable
string which causes segfaults on FreeBSD, since basename(3) uses the
provided buffer to store it's result.
Change the code to duplicate the string with strdup() and call basename
on the duplicated string instead.
Diffstat (limited to 'lisp/struct.h')
0 files changed, 0 insertions, 0 deletions