1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Update libwebp to 0.5.2

This commit is contained in:
volzhs
2016-12-22 09:54:15 +09:00
parent 2c8a172915
commit e04c7e11ec
28 changed files with 311 additions and 230 deletions

View File

@@ -175,8 +175,12 @@ static int CheckSizeArgumentsOverflow(uint64_t nmemb, size_t size) {
}
#endif
#if defined(MALLOC_LIMIT)
if (mem_limit > 0 && total_mem + total_size >= mem_limit) {
return 0; // fake fail!
if (mem_limit > 0) {
const uint64_t new_total_mem = (uint64_t)total_mem + total_size;
if (new_total_mem != (size_t)new_total_mem ||
new_total_mem > mem_limit) {
return 0; // fake fail!
}
}
#endif