Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 28) sorted by relevance

12

/cts/tests/tests/graphics/jni/
Dandroid_graphics_fonts_cts_SystemFonts.cpp142 void nCloseIterator(JNIEnv*, jclass, jlong ptr) { in nCloseIterator() argument
143 ASystemFontIterator_close(reinterpret_cast<ASystemFontIterator*>(ptr)); in nCloseIterator()
146 jlong nGetNext(JNIEnv*, jclass, jlong ptr) { in nGetNext() argument
148 reinterpret_cast<ASystemFontIterator*>(ptr))); in nGetNext()
151 void nCloseFont(JNIEnv*, jclass, jlong ptr) { in nCloseFont() argument
152 return AFont_close(reinterpret_cast<AFont*>(ptr)); in nCloseFont()
155 jstring nGetFilePath(JNIEnv* env, jclass, jlong ptr) { in nGetFilePath() argument
156 return env->NewStringUTF(AFont_getFontFilePath(reinterpret_cast<AFont*>(ptr))); in nGetFilePath()
159 jint nGetWeight(JNIEnv*, jclass, jlong ptr) { in nGetWeight() argument
160 return AFont_getWeight(reinterpret_cast<AFont*>(ptr)); in nGetWeight()
[all …]
Dandroid_graphics_cts_FrameRateCtsActivity.cpp88 int8_t* ptr = buf + row * bytesPerStride; in Buffer() local
89 for (int col = 0; col < width; col++, ptr += bytesPerPixel) { in Buffer()
90 ptr[0] = rgbaBytes[0]; in Buffer()
91 ptr[1] = rgbaBytes[1]; in Buffer()
92 ptr[2] = rgbaBytes[2]; in Buffer()
93 ptr[3] = rgbaBytes[3]; in Buffer()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/
Dpoc.cpp48 static void (*real_GKI_freebuf)(void *ptr) = nullptr;
75 void *ptr = nullptr; in GKI_getbuf() local
77 ptr = malloc(size); in GKI_getbuf()
78 memset(ptr, DEFAULT_VALUE, size); in GKI_getbuf()
79 kVulnPtr = ptr; in GKI_getbuf()
82 ptr = real_GKI_getbuf(size); in GKI_getbuf()
84 return ptr; in GKI_getbuf()
87 void GKI_freebuf(void *ptr) { in GKI_freebuf() argument
91 if (ptr == kVulnPtr) { in GKI_freebuf()
92 free(ptr); in GKI_freebuf()
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2021-0473/
Dpoc.cpp32 static void (*real_GKI_freebuf)(void *ptr) = nullptr;
38 void *ptr = nullptr; member
73 void *ptr = real_GKI_getpoolbuf(pool_id); in GKI_getpoolbuf() local
75 vulnerablePtr.ptr = ptr; in GKI_getpoolbuf()
77 return ptr; in GKI_getpoolbuf()
80 void GKI_freebuf(void *ptr) { in GKI_freebuf() argument
84 if (ptr == vulnerablePtr.ptr) { in GKI_freebuf()
91 real_GKI_freebuf(ptr); in GKI_freebuf()
/cts/hostsidetests/statsdatom/apps/statsdapp/jni/
Dalloc_stress_activity.cpp30 volatile void *ptr; in Java_com_android_server_cts_device_statsdatom_MemoryHogger_allocate() local
33 ptr = mmap(NULL, s, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); in Java_com_android_server_cts_device_statsdatom_MemoryHogger_allocate()
34 if (ptr == MAP_FAILED) { in Java_com_android_server_cts_device_statsdatom_MemoryHogger_allocate()
38 memset((void *)ptr, (int)allocCount >> 10, s); in Java_com_android_server_cts_device_statsdatom_MemoryHogger_allocate()
43 gptr = ptr; in Java_com_android_server_cts_device_statsdatom_MemoryHogger_allocate()
/cts/hostsidetests/securitybulletin/securityPatch/includes/
Dmemutils.c172 void *ptr = memalign(sizeof(size_t), (nitems * size)); in calloc() local
173 if (ptr) in calloc()
174 memset(ptr, 0, (nitems * size)); in calloc()
175 return ptr; in calloc()
178 void *realloc(void *ptr, size_t size) { in realloc() argument
184 return real_realloc(ptr, size); in realloc()
187 if (ptr != NULL) { in realloc()
190 if (ptr == s_mem_map[i].mem_ptr) { in realloc()
196 memcpy(temp, ptr, size); in realloc()
198 memcpy(temp, ptr, s_mem_map[i].mem_size); in realloc()
[all …]
Dmemutils_track.c113 void free(void *ptr) { in free() argument
117 if (ptr) { in free()
119 if (ptr == s_allocation_list[i].mem_ptr) { in free()
120 real_free(ptr); in free()
127 return real_free(ptr); in free()
Dmemutils.h50 static void* (*real_realloc)(void *ptr, size_t size) = NULL;
/cts/tests/tests/graphics/src/android/graphics/fonts/
DNativeSystemFontHelper.java161 private static native void nCloseIterator(long ptr); in nCloseIterator() argument
162 private static native long nNext(long ptr); in nNext() argument
163 private static native void nCloseFont(long ptr); in nCloseFont() argument
164 private static native String nGetFilePath(long ptr); in nGetFilePath() argument
165 private static native int nGetWeight(long ptr); in nGetWeight() argument
166 private static native boolean nIsItalic(long ptr); in nIsItalic() argument
167 private static native String nGetLocale(long ptr); in nGetLocale() argument
168 private static native int nGetCollectionIndex(long ptr); in nGetCollectionIndex() argument
169 private static native int nGetAxisCount(long ptr); in nGetAxisCount() argument
170 private static native int nGetAxisTag(long ptr, int index); in nGetAxisTag() argument
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/
Dpoc.cpp53 static void (*real_GKI_freebuf)(void* ptr) = nullptr;
67 void GKI_freebuf(void* ptr) { in GKI_freebuf() argument
71 if (ptr == kAllocatedPointers[0] || ptr == kAllocatedPointers[1]) { in GKI_freebuf()
74 real_GKI_freebuf(ptr); in GKI_freebuf()
79 void *ptr = memalign(16, size); in allocate_memory() local
80 memset(ptr, 0x0, size); in allocate_memory()
81 kAllocatedPointers[++allocatedPointersIndex] = ptr; in allocate_memory()
82 return ptr; in allocate_memory()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/
Dpoc.cpp76 char *ptr = (char *) malloc(STACK_SIZE); in main() local
77 if (!ptr) { in main()
82 memset(ptr, INITIAL_VAL, STACK_SIZE); in main()
83 clone(&poc, ptr + STACK_SIZE, CLONE_VM, sTp); in main()
92 free(ptr); in main()
/cts/tests/tests/view/src/android/view/cts/
DChoreographerNativeTest.java72 private static native boolean nativePrepareChoreographerTests(long ptr, long[] refreshPeriods); in nativePrepareChoreographerTests() argument
73 private static native void nativeTestPostCallbackWithoutDelayEventuallyRunsCallbacks(long ptr); in nativeTestPostCallbackWithoutDelayEventuallyRunsCallbacks() argument
74 private static native void nativeTestPostCallbackWithDelayEventuallyRunsCallbacks(long ptr); in nativeTestPostCallbackWithDelayEventuallyRunsCallbacks() argument
76 long ptr); in nativeTestPostCallback64WithoutDelayEventuallyRunsCallbacks() argument
77 private static native void nativeTestPostCallback64WithDelayEventuallyRunsCallbacks(long ptr); in nativeTestPostCallback64WithDelayEventuallyRunsCallbacks() argument
79 long ptr); in nativeTestPostCallbackMixedWithoutDelayEventuallyRunsCallbacks() argument
81 long ptr); in nativeTestPostCallbackMixedWithDelayEventuallyRunsCallbacks() argument
83 long ptr); in nativeTestRefreshRateCallback() argument
84 private static native void nativeTestUnregisteringRefreshRateCallback(long ptr); in nativeTestUnregisteringRefreshRateCallback() argument
85 private static native void nativeTestMultipleRefreshRateCallbacks(long ptr); in nativeTestMultipleRefreshRateCallbacks() argument
[all …]
/cts/common/device-side/bedstead/testapp/tools/index/
Dindex_testapps.py68 def parse_line(manifest_content, ptr, incoming_indentation = -1): argument
69 line = manifest_content[ptr]
74 return ptr, None
76 ptr += 1
79 while (ptr < len(manifest_content)):
80 ptr, next_child = parse_line(manifest_content, ptr, indentation_size)
86 return ptr, XmlTreeLine(line_without_indentation, children)
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/
Dpoc.cpp38 void* ptr = malloc(size); in GKI_getbuf() local
40 vulnerable_ptr = ptr; in GKI_getbuf()
42 return ptr; in GKI_getbuf()
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DSecurityTestCase.java182 String ptr = null; in assertNotKernelPointer() local
184 ptr = getPtrFunction.call(); in assertNotKernelPointer()
185 if (ptr == null) { in assertNotKernelPointer()
188 if (!isKptr(ptr)) { in assertNotKernelPointer()
198 fail("\"" + ptr + "\" is an exposed kernel pointer."); in assertNotKernelPointer()
201 private boolean isKptr(String ptr) { in isKptr() argument
202 Matcher m = Pattern.compile("[0-9a-fA-F]*").matcher(ptr); in isKptr()
211 BigInteger address = new BigInteger(ptr.substring(0, length), RADIX_HEX); in isKptr()
218 BigInteger address = new BigInteger(ptr.substring(0, length), RADIX_HEX); in isKptr()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/
Dpoc.cpp29 void operator delete(void *ptr) throw() { in operator delete() argument
30 if (ptr == authTokenKey) { in operator delete()
33 if (!ptr) { in operator delete()
34 free(ptr); in operator delete()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/
Dpoc.cpp38 static void (*real_GKI_freebuf)(void *ptr) = nullptr;
61 void GKI_freebuf(void *ptr) { in GKI_freebuf() argument
65 free(ptr); in GKI_freebuf()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/
Dpoc.cpp38 static void (*real_GKI_freebuf)(void *ptr) = nullptr;
61 void GKI_freebuf(void *ptr) { in GKI_freebuf() argument
65 free(ptr); in GKI_freebuf()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/
Dpoc.cpp38 static void (*real_GKI_freebuf)(void *ptr) = nullptr;
61 void GKI_freebuf(void *ptr) { in GKI_freebuf() argument
65 free(ptr); in GKI_freebuf()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2017-0477/
Dpoc.c54 void *ptr = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, fd, 0); in main() local
56 gdx2d_pixmap *pixmap = gdx2d_load((unsigned char *) ptr, st.st_size); in main()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2021/
Dpoc.cpp52 void *ptr = memalign(16, size); in allocate_memory() local
53 memset(ptr, 0x0, size); in allocate_memory()
54 return ptr; in allocate_memory()
/cts/tests/tests/os/jni/
Dandroid_os_cts_CpuInstructions.cpp82 uint32_t *ptr = &dummy; in swp() local
83 asm volatile ( "swp r0, r0, [%0]" : "+r"(ptr) : : "r0" ); in swp()
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-2022/
Dpoc.cpp57 void *ptr = memalign(16, size); in allocate_memory() local
58 memset(ptr, 0x0, size); in allocate_memory()
59 return ptr; in allocate_memory()
/cts/tests/tests/media/libmediandkjni/
Dnative-mediadrm-jni.cpp285 if (!array.ptr) { in Java_android_media_cts_NativeMediaDrmClearkeyTest_testPropertyByteArrayNative()
290 if (memcmp(array.ptr, value, sizeof(value)) != 0) { in Java_android_media_cts_NativeMediaDrmClearkeyTest_testPropertyByteArrayNative()
504 crypto = AMediaCrypto_new(&uuid[0], sessionId.ptr, sessionId.length); in playContent()
623 keyStatus.keyId.ptr = keysStatus[i].keyId.ptr; in onKeysChangeListener()
627 ALOGD("key[%zd]: key: %0x, %0x, %0x", i, keyStatus.keyId.ptr[0], keyStatus.keyId.ptr[1], in onKeysChangeListener()
628 keyStatus.keyId.ptr[2]); in onKeysChangeListener()
957 memcpy(sids.at(i).data(), sessionId.ptr, sessionId.length); in Java_android_media_cts_NativeMediaDrmClearkeyTest_testFindSessionIdNative()
958 sessionId.ptr = static_cast<uint8_t *>(sids.at(i).data()); in Java_android_media_cts_NativeMediaDrmClearkeyTest_testFindSessionIdNative()
/cts/tests/media/jni/
DNativeMediaCommon.cpp85 uint8_t* ptr = (buffer + *pos); in flattenField() local
87 *ptr++ = (uint8_t)((value >> (i * 8)) & 0xff); in flattenField()

12