Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-27 18:40:48 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-27 18:40:48 +0400
commitecb58629f2f91a3381fafc03d2ec394b0d6a097f (patch)
tree66c0ba64a7c21597f434e5272b5ac3740816e4ee /source
parent1448d188a126ebd1e47dd30fade43fa5749f8b17 (diff)
Fix #22875: image browser crashes on true colour jpg. The skip_input_data
callback was not correct, modified now to based on jpeg_mem_src as included with libjpeg.
Diffstat (limited to 'source')
-rw-r--r--source/blender/imbuf/intern/jpeg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 3803aa9a8b2..2bae7228220 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -156,7 +156,10 @@ static void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
{
my_src_ptr src = (my_src_ptr) cinfo->src;
- src->pub.next_input_byte = src->pub.next_input_byte + num_bytes;
+ if(num_bytes > 0) {
+ src->pub.next_input_byte = src->pub.next_input_byte + num_bytes;
+ src->pub.bytes_in_buffer = src->pub.bytes_in_buffer - num_bytes;
+ }
}