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

Issue 3978041: Review: JPEG robust to broken files (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by larrygritz
Modified:
13 years, 2 months ago
Reviewers:
oiio-dev, jrobertray
Base URL:
http://svn.openimageio.org/oiio/trunk/
Visibility:
Public.

Description

Intercept the internal JPEG library errors and report them. Pay particular attention to things that might mean a corrupt JPEG file.

Patch Set 1 #

Total comments: 3

Patch Set 2 : Take 2 #

Total comments: 10

Patch Set 3 : Next try -- raytype() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -19 lines) Patch
src/jpeg.imageio/jpeg_pvt.h View 1 2 3 chunks +22 lines, -2 lines 0 comments Download
src/jpeg.imageio/jpeginput.cpp View 1 2 7 chunks +119 lines, -17 lines 0 comments Download

Messages

Total messages: 10
larrygritz
13 years, 3 months ago (2011-01-13 06:05:46 UTC) #1
jrobertray
http://codereview.appspot.com/3978041/diff/1/src/jpeg.imageio/jpeginput.cpp File src/jpeg.imageio/jpeginput.cpp (right): http://codereview.appspot.com/3978041/diff/1/src/jpeg.imageio/jpeginput.cpp#newcode91 src/jpeg.imageio/jpeginput.cpp:91: char errbuf[JMSG_LENGTH_MAX]; errbuf unused here. http://codereview.appspot.com/3978041/diff/1/src/jpeg.imageio/jpeginput.cpp#newcode257 src/jpeg.imageio/jpeginput.cpp:257: if (! ...
13 years, 3 months ago (2011-01-13 18:44:54 UTC) #2
larrygritz
Take 2
13 years, 3 months ago (2011-01-14 01:51:15 UTC) #3
larrygritz
Thanks for the review. How's it look now? It's a little complicated with close(), but ...
13 years, 3 months ago (2011-01-14 01:52:26 UTC) #4
jrobertray
Looks safer now. I've marked the places I found that would leave the custom error ...
13 years, 3 months ago (2011-01-14 21:29:43 UTC) #5
larrygritz
On 2011/01/14 21:29:43, jrobertray wrote: > Looks safer now. I've marked the places I found ...
13 years, 3 months ago (2011-01-15 01:09:11 UTC) #6
larrygritz
Next try -- raytype()
13 years, 3 months ago (2011-01-15 23:48:56 UTC) #7
larrygritz
On 2011/01/15 23:48:56, larrygritz wrote: > Next try -- raytype() Bad cut and paste! Forget ...
13 years, 3 months ago (2011-01-15 23:52:48 UTC) #8
larrygritz
Any further comments about this, or is my current proposal satisfactory?
13 years, 3 months ago (2011-01-20 06:18:59 UTC) #9
jrobertray
13 years, 3 months ago (2011-01-20 20:02:56 UTC) #10
Regarding the matter of reading scanlines in close(), the jpeg library
offers jpeg_abort_decompress() as a way to free up internal memory
without decoding the rest of the file. Not calling it may leak
resources, but I haven't tested this.

Code looks good to me.

On Wed, Jan 19, 2011 at 10:18 PM,  <larrygritz@gmail.com> wrote:
> Any further comments about this, or is my current proposal satisfactory?
>
>
> http://codereview.appspot.com/3978041/
>
Sign in to reply to this message.

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