mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -887,7 +887,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, | ||||
| 			   	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) | ||||
|   | ||||
| @@ -3470,7 +3470,7 @@ struct pval *npval(pvaltype type, int first_line, int last_line, | ||||
| 	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; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -854,7 +854,7 @@ struct pval *npval(pvaltype type, int first_line, int last_line, | ||||
| 	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; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -3444,7 +3444,7 @@ static void setup_filestack(char *fnamebuf2, int fnamebuf_siz, glob_t *globbuf, | ||||
| 			   	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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user