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

Commit 815ea279 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "gatt: fix potential use of NULL"

parents 00194a8c b7e10920
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1527,10 +1527,12 @@ static void gattClientScanFilterAddNative(JNIEnv* env, jobject object,
      if (len != 16) {
        ALOGE("%s: Invalid IRK length '%d'; expected 16", __func__, len);
        jniThrowIOException(env, EINVAL);
        return;
      }
      jbyte* irkBytes = env->GetByteArrayElements(irkByteArray.get(), NULL);
      if (irkBytes == NULL) {
        jniThrowIOException(env, EINVAL);
        return;
      }
      for (int j = 0; j < len; j++) {
        curr.irk[j] = irkBytes[j];