mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
Sanatize result from bfd_find_nearest_line (BETTER_BACKTRACES)
bfd_find_nearest_line can possibly set file to null resulting in a crash when strrchr(file) runs (closes issue ASTERISK-19815) Reported by Mark Murawski Tested by Mark Murawski git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@364635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1383,6 +1383,9 @@ char **ast_bt_get_symbols(void **addresses, size_t num_frames)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* file can possibly be null even with a success result from bfd_find_nearest_line */
|
||||
file = file ? file : "";
|
||||
|
||||
/* Stack trace output */
|
||||
found++;
|
||||
if ((lastslash = strrchr(file, '/'))) {
|
||||
|
||||
Reference in New Issue
Block a user