diff options
author | Geremy Condra <gcondra@google.com> | 2012-03-29 13:29:11 -0700 |
---|---|---|
committer | Geremy Condra <gcondra@google.com> | 2012-03-29 13:29:11 -0700 |
commit | 54d908dc93dbbaacd15b8a53b29a8fb88b6c472c (patch) | |
tree | 1257afdb6b0568634b4d31f9d993579e8c4ac851 | |
parent | ccee121fae4c60a5dee6fce51195185694c376c3 (diff) | |
download | libpng-54d908dc93dbbaacd15b8a53b29a8fb88b6c472c.tar.gz |
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 d67af5877..31c9b01b0 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; |