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

Issue 2655042: Fixed infinite loops and buffer overflow in byte_scan when scanning for integ... (Closed)

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

Description

Fixed infinite loops and buffer overflow in byte_scan when scanning for integers and floating-point numbers. - The byte_scan and associated functions are not very well written. I tried to clean them as much as possible without re-writing the whole thing. - Replaced lBuildFloatValue function with atof. lBuildFloatValue was returning incorrect value anyway. The only reason it was working so far because we never used that value. BUG=59623(crbug.com), 603333(bugzilla.mozilla.org)

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -147 lines) Patch
M src/compiler/preprocessor/scanner.c View 10 chunks +80 lines, -147 lines 6 comments Download

Messages

Total messages: 8
Alok Priyadarshi
14 years, 10 months ago (2010-10-22 18:25:00 UTC) #1
dgkoch
a couple of possible issues noted below. You've also ran the CTS on with this ...
14 years, 10 months ago (2010-10-25 17:57:55 UTC) #2
Alok Priyadarshi
Yes - CTS passes. http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c (right): http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c#newcode247 src/compiler/preprocessor/scanner.c:247: yylvalpp->sc_fval = (float) atof(yylvalpp->symbol_name); On ...
14 years, 10 months ago (2010-10-25 18:22:57 UTC) #3
dgkoch
OK. LGTM then.
14 years, 10 months ago (2010-10-25 18:25:42 UTC) #4
Alok Priyadarshi
On 2010/10/25 18:25:42, dgkoch wrote: > OK. LGTM then. Ken: If you are not too ...
14 years, 10 months ago (2010-10-25 19:36:10 UTC) #5
kbr1
LGTM though I didn't have time to go through it very carefully. One comment. http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c ...
14 years, 10 months ago (2010-10-26 01:51:23 UTC) #6
Alok Priyadarshi
http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c File src/compiler/preprocessor/scanner.c (right): http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c#newcode248 src/compiler/preprocessor/scanner.c:248: if (isinff(yylvalpp->sc_fval)) { On 2010/10/26 01:51:23, kbr1 wrote: > ...
14 years, 10 months ago (2010-10-26 04:29:07 UTC) #7
kbr1
14 years, 10 months ago (2010-10-26 20:46:07 UTC) #8
On 2010/10/26 04:29:07, Alok Priyadarshi wrote:
>
http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanner.c
> File src/compiler/preprocessor/scanner.c (right):
> 
>
http://codereview.appspot.com/2655042/diff/1/src/compiler/preprocessor/scanne...
> src/compiler/preprocessor/scanner.c:248: if (isinff(yylvalpp->sc_fval)) {
> On 2010/10/26 01:51:23, kbr1 wrote:
> > Is isinff available on all platforms? Windows in particular?
> 
> isinff is defined in this file.

OK. LGTM
Sign in to reply to this message.

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