[svn-commits] tilghman: trunk r272260 - in /trunk/res/ael: ael.flex ael.tab.c ael.y ael_lex.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 23 16:06:45 CDT 2010


Author: tilghman
Date: Wed Jun 23 16:06:40 2010
New Revision: 272260

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272260
Log:
Ensure a NULL file while debugging cannot crash AEL.

(closes issue #17215)
 Reported by: vazir
 Patches: 
       20100518__issue17215.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman

Modified:
    trunk/res/ael/ael.flex
    trunk/res/ael/ael.tab.c
    trunk/res/ael/ael.y
    trunk/res/ael/ael_lex.c

Modified: trunk/res/ael/ael.flex
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael.flex?view=diff&rev=272260&r1=272259&r2=272260
==============================================================================
--- trunk/res/ael/ael.flex (original)
+++ trunk/res/ael/ael.flex Wed Jun 23 16:06:40 2010
@@ -887,7 +887,7 @@
 			   	free(include_stack[include_stack_index].fname);
 				include_stack[include_stack_index].fname = 0;
 			}
-			include_stack[include_stack_index].fname = strdup(my_file);
+			include_stack[include_stack_index].fname = strdup(S_OR(my_file, "<none>"));
 			include_stack[include_stack_index].lineno = my_lineno;
 			include_stack[include_stack_index].colno = my_col+yyleng;
 			if (my_file)

Modified: trunk/res/ael/ael.tab.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael.tab.c?view=diff&rev=272260&r1=272259&r2=272260
==============================================================================
--- trunk/res/ael/ael.tab.c (original)
+++ trunk/res/ael/ael.tab.c Wed Jun 23 16:06:40 2010
@@ -3470,7 +3470,7 @@
 	z->endline = last_line;
 	z->startcol = first_column;
 	z->endcol = last_column;
-	z->filename = strdup(my_file);
+	z->filename = strdup(S_OR(my_file, "<none>"));
 	return z;
 }
 

Modified: trunk/res/ael/ael.y
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael.y?view=diff&rev=272260&r1=272259&r2=272260
==============================================================================
--- trunk/res/ael/ael.y (original)
+++ trunk/res/ael/ael.y Wed Jun 23 16:06:40 2010
@@ -854,7 +854,7 @@
 	z->endline = last_line;
 	z->startcol = first_column;
 	z->endcol = last_column;
-	z->filename = strdup(my_file);
+	z->filename = strdup(S_OR(my_file, "<none>"));
 	return z;
 }
 

Modified: trunk/res/ael/ael_lex.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/ael/ael_lex.c?view=diff&rev=272260&r1=272259&r2=272260
==============================================================================
--- trunk/res/ael/ael_lex.c (original)
+++ trunk/res/ael/ael_lex.c Wed Jun 23 16:06:40 2010
@@ -3444,7 +3444,7 @@
 			   	free(include_stack[include_stack_index].fname);
 				include_stack[include_stack_index].fname = 0;
 			}
-			include_stack[include_stack_index].fname = strdup(my_file);
+			include_stack[include_stack_index].fname = strdup(S_OR(my_file, "<none>"));
 			include_stack[include_stack_index].lineno = my_lineno;
 			include_stack[include_stack_index].colno = my_col+yyleng;
 			if (my_file)




More information about the svn-commits mailing list