[PATCH][gdb] Fix dynamic-stack-buffer-overflow in linespec_lexer_lex_string

Tom Tromey tom@tromey.com
Wed May 29 18:49:00 GMT 2019


>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom>  	      else if (PARSER_STREAM (parser) - start > 4
Tom>  		       && startswith (PARSER_STREAM (parser) - 4, "[abi"))
Tom> -		++(PARSER_STREAM (parser));
Tom> +		;

I think it's better for empty statements to be more verbose, like:

 else if (...)
   {
     /* Nothing.  */
   }

This is ok with this change.

Tom



More information about the Gdb-patches mailing list