commit | 54d908dc93dbbaacd15b8a53b29a8fb88b6c472c | [log] [tgz] |
---|---|---|
author | Geremy Condra <gcondra@google.com> | Thu Mar 29 13:29:11 2012 -0700 |
committer | Geremy Condra <gcondra@google.com> | Thu Mar 29 13:29:11 2012 -0700 |
tree | 1257afdb6b0568634b4d31f9d993579e8c4ac851 | |
parent | ccee121fae4c60a5dee6fce51195185694c376c3 [diff] |
Fix for CVE-2011-3045 Change-Id: Ia46a262f8c73ec8ad6634c5de5f776373c330061
diff --git a/pngrutil.c b/pngrutil.c index d67af58..31c9b01 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;