aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2012-04-10 19:29:55 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-10 19:29:55 -0700
commit34efb3d5dcb9d1c7552725702ba2cfc905b4c39a (patch)
tree1257afdb6b0568634b4d31f9d993579e8c4ac851
parentc5ac2140cad524c0df13aafb82211bef3068580d (diff)
parent54d908dc93dbbaacd15b8a53b29a8fb88b6c472c (diff)
downloadexternal_libpng-34efb3d5dcb9d1c7552725702ba2cfc905b4c39a.zip
external_libpng-34efb3d5dcb9d1c7552725702ba2cfc905b4c39a.tar.gz
external_libpng-34efb3d5dcb9d1c7552725702ba2cfc905b4c39a.tar.bz2
Merge "Fix for CVE-2011-3045"
-rw-r--r--pngrutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pngrutil.c b/pngrutil.c
index d67af58..31c9b01 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -264,8 +264,8 @@ png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size,
{
if (output != 0 && output_size > count)
{
- int copy = output_size - count;
- if (avail < copy) copy = avail;
+ png_size_t copy = output_size - count;
+ if ((png_size_t) avail < copy) copy = (png_size_t) avail;
png_memcpy(output + count, png_ptr->zbuf, copy);
}
count += avail;