[asterisk-commits] markm: branch 1.8 r364635 - /branches/1.8/main/logger.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Apr 30 10:51:16 CDT 2012
Author: markm
Date: Mon Apr 30 10:51:12 2012
New Revision: 364635
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=364635
Log:
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
Modified:
branches/1.8/main/logger.c
Modified: branches/1.8/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/logger.c?view=diff&rev=364635&r1=364634&r2=364635
==============================================================================
--- branches/1.8/main/logger.c (original)
+++ branches/1.8/main/logger.c Mon Apr 30 10:51:12 2012
@@ -1383,6 +1383,9 @@
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, '/'))) {
More information about the asterisk-commits
mailing list