Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: third_party/libpng/pngpread.c

Issue 1467263003: third_party/libpng: update to 1.2.54 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libpng/pngpread.c
diff --git a/third_party/libpng/pngpread.c b/third_party/libpng/pngpread.c
index 5af209d4d533be5c16288161829c4379379c8f84..419995eab9fc7ab04aa9bbc90e9122b3f514bcd0 100644
--- a/third_party/libpng/pngpread.c
+++ b/third_party/libpng/pngpread.c
@@ -685,9 +685,12 @@ png_push_save_buffer(png_structp png_ptr)
png_free(png_ptr, old_buffer);
png_error(png_ptr, "Insufficient memory for save_buffer");
}
- png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
- png_free(png_ptr, old_buffer);
- png_ptr->save_buffer_max = new_max;
+ else
+ {
+ png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
+ png_free(png_ptr, old_buffer);
+ png_ptr->save_buffer_max = new_max;
+ }
}
if (png_ptr->current_buffer_size)
{

Powered by Google App Engine
This is Rietveld 408576698