Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 196863d2 authored by Gloria Wang's avatar Gloria Wang
Browse files

Fix for the safty check. It checks that nFir21 + jNpoints <= BUF_SIZE,

 but when it calls GetByteArrayRegion, it multiplies it by 2 which
 defeats the "// safety first" check at the beginning.
parent bc92766c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static void android_media_ResampleInputStream_fir21(JNIEnv *env, jclass clazz,
         jint jNpoints) {
    
    // safety first!
    if (nFir21 + jNpoints > BUF_SIZE) {
    if (nFir21 + jNpoints * 2 > BUF_SIZE) {
        throwException(env, "java/lang/IllegalArgumentException",
                "FIR+data too long %d", nFir21 + jNpoints);
        return;