diff options
author | Geremy Condra <gcondra@google.com> | 2012-03-29 13:29:11 -0700 |
---|---|---|
committer | Geremy Condra <gcondra@google.com> | 2012-04-11 18:20:45 -0700 |
commit | e347efe72f8a6b6bc77a7270e6bfd2235e5d8021 (patch) | |
tree | e1fb672124c70790215d8ca349f52cf617e7b97f | |
parent | 17b24482db9fb75020b91a9c17f2014beebc86ed (diff) | |
download | libpng-e347efe72f8a6b6bc77a7270e6bfd2235e5d8021.tar.gz |
DO NOT MERGE Fix for CVE-2011-3045
Change-Id: Ia46a262f8c73ec8ad6634c5de5f776373c330061
-rw-r--r-- | pngrutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pngrutil.c b/pngrutil.c index dfa2c03b6..47c781c1c 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; |