summaryrefslogtreecommitdiffstats
path: root/rs
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2013-12-18 16:21:30 -0800
committerStephen Hines <srhines@google.com>2013-12-18 16:33:49 -0800
commita0eabfbc413cf6ee0659ac19243efc5ba2d0f733 (patch)
tree2da7dcb666f51f960707719c32c6c7b45048b602 /rs
parent0c34ee698edcd3bdfa4a1d26224e1ed1b96a9238 (diff)
downloadframeworks_base-a0eabfbc413cf6ee0659ac19243efc5ba2d0f733.zip
frameworks_base-a0eabfbc413cf6ee0659ac19243efc5ba2d0f733.tar.gz
frameworks_base-a0eabfbc413cf6ee0659ac19243efc5ba2d0f733.tar.bz2
Fix improper declaration/use of pointer.
https://code.google.com/p/android/issues/detail?id=61547 This variable is shadowing the outer "ptr" declaration, resulting in a potential NULL pointer being passed to the message API. Change-Id: If96bfae8d5e874e12597182678a180ba137b78da
Diffstat (limited to 'rs')
-rw-r--r--rs/jni/android_renderscript_RenderScript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 619e737..ece7a40 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -392,7 +392,7 @@ nContextSendMessage(JNIEnv *_env, jobject _this, jlong con, jint id, jintArray d
jint len = 0;
if (data) {
len = _env->GetArrayLength(data);
- jint *ptr = _env->GetIntArrayElements(data, NULL);
+ ptr = _env->GetIntArrayElements(data, NULL);
}
LOG_API("nContextSendMessage, con(%p), id(%i), len(%i)", con, id, len);
rsContextSendMessage((RsContext)con, id, (const uint8_t *)ptr, len * sizeof(int));