commit | e347efe72f8a6b6bc77a7270e6bfd2235e5d8021 | [log] [tgz] |
---|---|---|
author | Geremy Condra <gcondra@google.com> | Thu Mar 29 13:29:11 2012 -0700 |
committer | Geremy Condra <gcondra@google.com> | Wed Apr 11 18:20:45 2012 -0700 |
tree | e1fb672124c70790215d8ca349f52cf617e7b97f | |
parent | 17b24482db9fb75020b91a9c17f2014beebc86ed [diff] |
DO NOT MERGE Fix for CVE-2011-3045 Change-Id: Ia46a262f8c73ec8ad6634c5de5f776373c330061
diff --git a/pngrutil.c b/pngrutil.c index dfa2c03..47c781c 100644 --- a/pngrutil.c +++ b/pngrutil.c
@@ -264,8 +264,8 @@ { 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;