Imported from libpng-1.2.23beta02.tar

This commit is contained in:
Glenn Randers-Pehrson
2007-10-16 14:27:46 -05:00
parent 6328671ef8
commit 28e3cb3e93
54 changed files with 157 additions and 148 deletions

View File

@@ -1,7 +1,7 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
* Last changed in libpng 1.2.22 [October 15, 2007]
* Last changed in libpng 1.2.22 [October 16, 2007]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2007 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -136,7 +136,7 @@ static PNG_CONST char png_digit[16] = {
'A', 'B', 'C', 'D', 'E', 'F'
};
#define PNG_MAX_ERROR_TEXT 63
#define PNG_MAX_ERROR_TEXT 64
#if !defined(PNG_NO_WARNINGS) || !defined(PNG_NO_ERROR_TEXT)
static void /* PRIVATE */
@@ -167,8 +167,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
{
buffer[iout++] = ':';
buffer[iout++] = ' ';
png_strncpy(buffer+iout, error_message, PNG_MAX_ERROR_TEXT);
buffer[iout+PNG_MAX_ERROR_TEXT] = '\0';
png_memcpy(buffer+iout, error_message, PNG_MAX_ERROR_TEXT);
}
}
@@ -176,7 +175,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
void PNGAPI
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
{
char msg[18+64];
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
png_error(png_ptr, error_message);
else
@@ -192,7 +191,7 @@ png_chunk_error(png_structp png_ptr, png_const_charp error_message)
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
char msg[18+64];
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
png_warning(png_ptr, warning_message);
else