瀏覽代碼

Fuzz: Fix a casting warning

Julius Pfrommer 5 年之前
父節點
當前提交
79c063752e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/fuzz/custom_memory_manager.c

+ 1 - 1
tests/fuzz/custom_memory_manager.c

@@ -48,7 +48,7 @@ int UA_memoryManager_setLimitFromLast4Bytes(const uint8_t *data, size_t size) {
     if (size <4)
         return 0;
     // just cast the last 4 bytes to uint32
-    const uint32_t *newLimit = (const void*)&(data[size-4]);
+    const uint32_t *newLimit = (const uint32_t*)(uintptr_t)&(data[size-4]);
     UA_memoryManager_setLimit(*newLimit);
     return 1;
 }