Commit 61c16b10 by Greg McGary Committed by Greg McGary

cppmacro.c (check_trad_stringification): Check token text pointers against limit…

cppmacro.c (check_trad_stringification): Check token text pointers against limit before dereferencing.

	* cppmacro.c (check_trad_stringification): Check token
	text pointers against limit before dereferencing.

From-SVN: r36447
parent 6a357625
2000-09-15 Greg McGary <greg@mcgary.org>
* cppmacro.c (check_trad_stringification): Check token
text pointers against limit before dereferencing.
2000-09-15 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c (format_wanted_type): New structure.
......
......@@ -645,11 +645,13 @@ check_trad_stringification (pfile, info, string)
const cpp_token *token;
/* Find the start of an identifier. */
while (!is_idstart (*p) && p < limit) p++;
while (p < limit && !is_idstart (*p))
p++;
/* Find the end of the identifier. */
q = p;
while (is_idchar (*q) && q < limit) q++;
while (q < limit && is_idchar (*q))
q++;
/* Loop over the function macro arguments to see if the
identifier inside the string matches one of them. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment