basic/memory-util: introduce mempcpy_typesafe

This commit is contained in:
Mike Yuan
2024-09-20 08:29:35 +09:00
committed by Yu Watanabe
parent 48837c6500
commit eda6223942
7 changed files with 16 additions and 14 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ int web_cache_add_item(
};
/* Just to be extra paranoid, let's NUL terminate the downloaded buffer */
*(uint8_t*) mempcpy(item->data, data, size) = 0;
*mempcpy_typesafe(item->data, data, size) = 0;
web_cache_item_free(hashmap_remove(*web_cache, url));