diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 18:22:04 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-18 18:22:04 +0000 |
commit | 71b9d6403ceaaef6b2b258fbb32f1a77b7c875e6 (patch) | |
tree | 30c9d23615c9d559a845b282a18b994d417e8f40 /third_party/libpng/pngwio.c | |
parent | fe5aac24dff85b8a035dbda9660d7b470fb08df0 (diff) | |
download | chromium_src-71b9d6403ceaaef6b2b258fbb32f1a77b7c875e6.zip chromium_src-71b9d6403ceaaef6b2b258fbb32f1a77b7c875e6.tar.gz chromium_src-71b9d6403ceaaef6b2b258fbb32f1a77b7c875e6.tar.bz2 |
libpng: update to 1.2.43
I unpacked libpng 1.2.43 and did:
cd third_party/libpng
for x in $(ls -1) ; do cp /tmp/libpng-1.2.43/$x .; done
The diffs appear to all be safe. The Chromium specific config is in pngusr.h
and isn't touched by this change.
1.2.43 fixes http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0205
c7013d773eb45b8ed6a864e419e544106a0dd95d /tmp/libpng-1.2.43.tar.xz
BUG=38512
TEST=none
http://codereview.chromium.org/1118002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libpng/pngwio.c')
-rw-r--r-- | third_party/libpng/pngwio.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/third_party/libpng/pngwio.c b/third_party/libpng/pngwio.c index 740b71d..5a4d04a 100644 --- a/third_party/libpng/pngwio.c +++ b/third_party/libpng/pngwio.c @@ -1,12 +1,15 @@ /* pngwio.c - functions for data output * - * Last changed in libpng 1.2.37 [June 4, 2009] - * For conditions of distribution and use, see copyright notice in png.h + * Last changed in libpng 1.2.41 [December 3, 2009] * Copyright (c) 1998-2009 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * * This file provides a location for all output. Users who need * special handling are expected to write functions that have the same * arguments as these and perform similar functions, but that possibly @@ -16,6 +19,7 @@ */ #define PNG_INTERNAL +#define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_WRITE_SUPPORTED @@ -35,7 +39,7 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) png_error(png_ptr, "Call to NULL write function"); } -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED /* This is the function that does the actual writing of data. If you are * not writing to a standard C stream, you should create a replacement * write_data function and use it at run time with png_set_write_fn(), rather @@ -49,7 +53,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) if (png_ptr == NULL) return; -#if defined(_WIN32_WCE) +#ifdef _WIN32_WCE if ( !WriteFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) ) check = 0; #else @@ -81,7 +85,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr); if ((png_bytep)near_data == data) { -#if defined(_WIN32_WCE) +#ifdef _WIN32_WCE if ( !WriteFile(io_ptr, near_data, length, &check, NULL) ) check = 0; #else @@ -98,7 +102,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { written = MIN(NEAR_BUF_SIZE, remaining); png_memcpy(buf, data, written); /* Copy far buffer to near buffer */ -#if defined(_WIN32_WCE) +#ifdef _WIN32_WCE if ( !WriteFile(io_ptr, buf, written, &err, NULL) ) err = 0; #else @@ -126,7 +130,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length) * to disk). After png_flush is called, there should be no data pending * writing in any buffers. */ -#if defined(PNG_WRITE_FLUSH_SUPPORTED) +#ifdef PNG_WRITE_FLUSH_SUPPORTED void /* PRIVATE */ png_flush(png_structp png_ptr) { @@ -134,16 +138,16 @@ png_flush(png_structp png_ptr) (*(png_ptr->output_flush_fn))(png_ptr); } -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED void PNGAPI png_default_flush(png_structp png_ptr) { -#if !defined(_WIN32_WCE) +#ifndef _WIN32_WCE png_FILE_p io_ptr; #endif if (png_ptr == NULL) return; -#if !defined(_WIN32_WCE) +#ifndef _WIN32_WCE io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr)); fflush(io_ptr); #endif @@ -189,7 +193,7 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_ptr->io_ptr = io_ptr; -#if !defined(PNG_NO_STDIO) +#ifdef PNG_STDIO_SUPPORTED if (write_data_fn != NULL) png_ptr->write_data_fn = write_data_fn; @@ -199,8 +203,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, png_ptr->write_data_fn = write_data_fn; #endif -#if defined(PNG_WRITE_FLUSH_SUPPORTED) -#if !defined(PNG_NO_STDIO) +#ifdef PNG_WRITE_FLUSH_SUPPORTED +#ifdef PNG_STDIO_SUPPORTED if (output_flush_fn != NULL) png_ptr->output_flush_fn = output_flush_fn; @@ -222,8 +226,8 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr, } } -#if defined(USE_FAR_KEYWORD) -#if defined(_MSC_VER) +#ifdef USE_FAR_KEYWORD +#ifdef _MSC_VER void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check) { void *near_ptr; |