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

Issue 3684042: Review: ImageInput::read_image allocation bug (Closed)

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

Description

ImageInput::read_image allocated the wrong size buffer where it stores individual scanlines or tiles -- for non-native reading, it needs to allocate pixels of the size the user requested, not the size of the data in the file. (Jeremy, this is your bug. It wasn't specific to OpenEXR.)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -1 line) Patch
src/libOpenImageIO/imageinput.cpp View 1 chunk +5 lines, -1 line 1 comment Download

Messages

Total messages: 2
larrygritz
13 years, 4 months ago (2010-12-16 05:38:54 UTC) #1
solomon.boulos
13 years, 4 months ago (2010-12-16 18:49:57 UTC) #2
http://codereview.appspot.com/3684042/diff/1/src/libOpenImageIO/imageinput.cpp
File src/libOpenImageIO/imageinput.cpp (right):

http://codereview.appspot.com/3684042/diff/1/src/libOpenImageIO/imageinput.cp...
src/libOpenImageIO/imageinput.cpp:167: stride_t pixel_bytes;
As a minor nit, unless you think you'll do more stuff in the if/else block, I'd
prefer a ternary initialization here (in this case it would look cleaner to my
eyes).
Sign in to reply to this message.

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