From: Neil H. <nh...@us...> - 2009-08-28 14:28:38
|
Update of /cvsroot/cscope/cscope In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25714 Modified Files: ChangeLog Log Message: The lexer, if passed a file with a c extension that has only a '=' or ':' symbol in it, will trigger lexer rules that expect my_yytext to be set. Since no other rules have been triggered yet, my_yytext is NULL and a segfault occurs. To fix this we add a LEXERR token and return it if my_yytext is null. This causes the crossref generator to detect the lexer error and abort further processing of the file. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -r1.180 -r1.181 *** ChangeLog 6 May 2009 14:41:50 -0000 1.180 --- ChangeLog 28 Aug 2009 14:28:27 -0000 1.181 *************** *** 1,2 **** --- 1,15 ---- + 2009-08-28 Neil Horman <nh...@tu...> + + * src/scanner.h: Added a LEXERR token to be returned if a lexer error + occurs + + * src/crossref.c: Check for LEXERR token, and abort processing file if + lexer error occurs + + * src/fcanner.l: check the statue of my_yytext on = and : symbols. If + its NULL consider that a lexer error. This can occur if input files are + provided that contain only a '=' or ':' symbol. Without the ability to + detect and return a lexer error, we get a segfault. + 2009-05-06 Neil Horman <nh...@tu...> |