Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(607)

Issue 2585042: Fixed stack overflow in CPPextension function. An arbitrary size buffer was b... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 7 months ago by Alok Priyadarshi
Modified:
13 years, 7 months ago
Reviewers:
kbr1, dgkoch
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Fixed stack overflow in CPPextension function. An arbitrary size buffer was being used for extension name. Changed it to use MAX_SYMBOL_NAME_LEN. - Also formalized the values for MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. They were being used as if there was a confusion whether it included the NULL terminator or not. - Fixed some minor issues with code releated to the usage of MAX_SYMBOL_NAME_LEN and MAX_STRING_LEN. BUG=59625 (crbug.com)

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+70 lines, -76 lines) Patch
M src/compiler/preprocessor/cpp.c View 1 2 chunks +3 lines, -2 lines 0 comments Download
M src/compiler/preprocessor/scanner.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler/preprocessor/scanner.c View 1 2 3 20 chunks +60 lines, -65 lines 0 comments Download
M src/compiler/preprocessor/tokens.c View 4 chunks +4 lines, -7 lines 0 comments Download

Messages

Total messages: 8
Alok Priyadarshi
13 years, 7 months ago (2010-10-19 21:52:20 UTC) #1
kbr1
LGTM with one comment. http://codereview.appspot.com/2585042/diff/1/src/compiler/preprocessor/cpp.c File src/compiler/preprocessor/cpp.c (right): http://codereview.appspot.com/2585042/diff/1/src/compiler/preprocessor/cpp.c#newcode685 src/compiler/preprocessor/cpp.c:685: strcpy(extensionName, GetAtomString(atable, yylvalpp->sc_ident)); Would it ...
13 years, 7 months ago (2010-10-19 22:48:31 UTC) #2
Alok Priyadarshi
Daniel? http://codereview.appspot.com/2585042/diff/1/src/compiler/preprocessor/cpp.c File src/compiler/preprocessor/cpp.c (right): http://codereview.appspot.com/2585042/diff/1/src/compiler/preprocessor/cpp.c#newcode685 src/compiler/preprocessor/cpp.c:685: strcpy(extensionName, GetAtomString(atable, yylvalpp->sc_ident)); On 2010/10/19 22:48:31, kbr1 wrote: ...
13 years, 7 months ago (2010-10-20 17:26:32 UTC) #3
dgkoch
One minor formatting thing and a question. Looks good otherwise. http://codereview.appspot.com/2585042/diff/5001/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c (right): http://codereview.appspot.com/2585042/diff/5001/src/compiler/preprocessor/scanner.c#newcode352 ...
13 years, 7 months ago (2010-10-20 19:20:14 UTC) #4
Alok Priyadarshi
http://codereview.appspot.com/2585042/diff/5001/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c (right): http://codereview.appspot.com/2585042/diff/5001/src/compiler/preprocessor/scanner.c#newcode352 src/compiler/preprocessor/scanner.c:352: symbol_name[len++] = ch; On 2010/10/20 19:20:14, dgkoch wrote: > ...
13 years, 7 months ago (2010-10-20 19:41:56 UTC) #5
dgkoch
... right I need to increase my mental patch review line-rentention policy... http://codereview.appspot.com/2585042/diff/11001/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c ...
13 years, 7 months ago (2010-10-20 20:01:37 UTC) #6
Alok Priyadarshi
http://codereview.appspot.com/2585042/diff/11001/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c (right): http://codereview.appspot.com/2585042/diff/11001/src/compiler/preprocessor/scanner.c#newcode352 src/compiler/preprocessor/scanner.c:352: symbol_name[len++] = ch; On 2010/10/20 20:01:38, dgkoch wrote: > ...
13 years, 7 months ago (2010-10-20 20:09:59 UTC) #7
dgkoch
13 years, 7 months ago (2010-10-20 20:35:26 UTC) #8
thanks. LGTM now
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b