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

Commit 582ae172 authored by Gloria Wang's avatar Gloria Wang Committed by Android (Google) Code Review
Browse files

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

Merge "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."
parents ab9985ed 196863d2
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;