summaryrefslogtreecommitdiff
path: root/turbojpeg-jni.c
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c>2012-05-11 07:46:03 +0000
committerhbono@chromium.org <hbono@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c>2012-05-11 07:46:03 +0000
commitdf5ffdd8b73415b78055177148995bdbdf38b12e (patch)
tree576b26685c24f24fd6aa83dda76529fde0c30ca1 /turbojpeg-jni.c
parentd1fe352415daa951ba28e4ef81bfa6a727104f5e (diff)
Update libjpeg-turbo.
This change updates our copy of libjpeg-turbo to r829. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10386084 git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libjpeg_turbo@136524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Diffstat (limited to 'turbojpeg-jni.c')
-rw-r--r--turbojpeg-jni.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/turbojpeg-jni.c b/turbojpeg-jni.c
index 25cca7d..1ff9bba 100644
--- a/turbojpeg-jni.c
+++ b/turbojpeg-jni.c
@@ -635,7 +635,8 @@ JNIEXPORT jintArray JNICALL Java_org_libjpegturbo_turbojpeg_TJTransformer_transf
if(t[i].r.w!=0) w=t[i].r.w;
if(t[i].r.h!=0) h=t[i].r.h;
bailif0(jdstBufs[i]=(*env)->GetObjectArrayElement(env, dstobjs, i));
- if((*env)->GetArrayLength(env, jdstBufs[i])<tjBufSize(w, h, jpegSubsamp))
+ if((unsigned long)(*env)->GetArrayLength(env, jdstBufs[i])
+ <tjBufSize(w, h, jpegSubsamp))
_throw("Destination buffer is not large enough");
bailif0(dstBufs[i]=(*env)->GetPrimitiveArrayCritical(env, jdstBufs[i], 0));
}