Fix seg fault parsing unterminated raw string literals
This commit is contained in:
parent
b3a61a3876
commit
dee6b075a8
3 changed files with 10 additions and 0 deletions
|
|
@ -754,6 +754,10 @@ static int look(Scanner *s) {
|
|||
str_delimiter = 0;
|
||||
return SWIG_TOKEN_STRING;
|
||||
} else { /* Incorrect end delimiter occured */
|
||||
if (c == 0) {
|
||||
Swig_error(cparse_file, cparse_start_line, "Unterminated raw string, started with R\"%s( is not terminated by )%s\"\n", str_delimiter, str_delimiter);
|
||||
return SWIG_TOKEN_ERROR;
|
||||
}
|
||||
retract( s, i );
|
||||
Delete( end_delimiter );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue