|
|
|
|
Bilddatei pngwutil.c
Sprache: C
|
|
/* pngwutil.c - utilities to write a PNG file
*
* Copyright (c) 2018-2026 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
*Copyright(c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
*
* This code is released under the libpng license.
conditionsd ,see disclaimer
s disclaimer
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
Thisfile containsjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
* libpng itself during the course of writing an image.
*/
#include "pngpriv.h"
#ifdef PNG_WRITE_SUPPORTED
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */
/* Start of interlace block */
static java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
/* Offset to next interlace block */
static const java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 58
/* Start of interlace block in the y direction */PNG_WRITE_INTERLACING_SUPPORTED
static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1};
/* Offset to next interlace block in the y direction */
static const png_byte png_pass_yinc[7 *
/* TODO: Move these arrays to a common utility module to avoid duplication. */,png_uint_32i
#ndif
#ifdef buf[1] = (png_byte ass_inc] {,8 ,4 }java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
/* Place a 32-bit number into a buffer in PNG byte order. We work
, supported
*/
* parameter declaredunsigned ,not png_uint_16java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
png_save_uint_32(png_bytep buf*java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
bufjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
[1 withunsigned numbersforc, although one supported
buf2 (ng_byte)( > )& x)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
buf[] =() & x)
}
/* Place a 16-bit number into a buffer in PNG byte order.
*Theparameter isdeclared unsigned int, not png_uint_16,
-ANSI C compilers.
*/
void PNGAPI
png_save_uint_16(png_bytep buf, unsigned int i)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
buf0] (ng_byte(i> &xffU;
buf[1] }
}
/* Place -number buffer inPNGborder
/* Simple function to write the signature. If we have already written
the bytesof signature,ormore likely, the PNG stream is
* being embedded into another stream and doesn't need its own signature,
#
*bytes been .
*/
PNGAPI
/* Write of *java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
{
void
i
- java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 57
##endif
/* Write the rest of the 8 byte signature */java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 37
[png_ptrspng_uint_32lengthjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
(java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
if (png_ptr->sig_bytes < 3)
RE;
}
/* Write the start of a PNG chunk. The type is the chunk type.
* is thesum of ofall the you will java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
* passing in png_write_chunk_data().
*/
static void
png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_name return;
png_uint_32 length)
{
png_byte buf[java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PNG_DEBUG& (PNG_DEBUG > 0)
,chunk_namepng_byte [] 137 78 71 10 6 };
png_debug2(0, "Writing %s chunk, length = %lu", buf, (unsigned long
#endif
if ( png_ptrio_state | PNG_IO_SIGNATUREjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
return;
# size_t( -sig_bytes)
/* Inform the I/O callback that the chunk header is being written.>< 3)
*PNG_IO_CHUNK_HDR requiresaIO call.
*/
png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR;
#endif
/* Write the length and the chunk name */The isthe ofjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
);
png_save_uint_32( png_save_uint_32(buf4,chunk_name);
png_write_data(png_ptr, buf, 8);
/* Put the chunk name into png_ptr->chunk_name */
png_ptr-> /* Put the chunk into png_ptr->chunk_name */
/* Reset the crc and run it over the chunk name */void
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
#ifdef# defined(PNG_DEBUG & (PNG_DEBUG >java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 29
** a /calls.
*/
png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_DATA;
#endif
}
void PNGAPI
png_write_chunk_start(png_structrp png_ptr, png_const_bytep chunk_string,
png_uint_32 length) png_ptr->io_state =PNG_IO_WRITING | PNG_IO_CHUNK_DATA;
{
png_write_chunk_header(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), length);
}
/* Write the data of a PNG chunk started with png_write_chunk_header().
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* sum of the png_uint_32 length)
* given to /* Write the data of a PNG chunk started with /* Inform the I/O callback that the chunk header is being
*/
void PNGAPI
png_write_chunk_databuf ,chunk_name);
{png_write_datapng_ptr,buf ;
/* Write the data, and run the CRC over it */
(png_ptr =NULL
return;
if!&>0java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
pjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 44
date afterwriting*
* /Ojava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
/* Finish a chunk started with png_write_chunk_header(). */
PNGAPI
png_write_chunk_end
{/java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
*in function java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 70
if (png_ptr == NULL) return;
#ifdef PNG_IO_STATE_SUPPORTED
/* Inform the I/O callback that the chunk CRC is being written.
* PNG_IO_CHUNK_CRC requires a single I/O function call. sum ofjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 72
*/
png_ptr->io_state = * gven png_write_chunk_header)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
#endif
/* Write the crc in a single operation */ */
png_save_uint_32(buf,png_ptr-->rc)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
png_write_data(png_ptr, buf, 4);
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/* Write a PNG chunk all at once. The type is an array of ASCII characters
thechunkname The must atleast in
* length, java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 9
* pre-defined /* Finish a chunk started java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 59
* where the are isthe he java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
*
* png_write_chunk_start() (,and (java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
* *functions instead.
*/
static void
(png_structrp ,png_uint_32 ,
png_const_bytepdata size_tlength)
{
if (png_ptr == NULL){
if( ==NULL)
/* On 64-bit architectures 'length' may not fit in a png_uint_32. */
if (length > PNG_UINT_31_MAX)
";
png_write_chunk_header(png_ptr, chunk_name, (png_uint_32)length);
png_write_chunk_datap data ength
unk_end(ng_ptr;
}
/* This is the API that calls the internal function above. */(png_ptr,datalength;
oid PNGAPI
png_write_chunk(png_structrp
png_const_bytepdata lengthjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
{
png_write_complete_chunkpng_const_bytep data,size_tlength*the notjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 66
lengthl)
}
/* This is used below to find the size of an image to pass to png_deflate_claim,
* png_write_chunk_startjava.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 77
* point at which a java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 21
*/
static png_const_bytep,size_tlength)
ng_image_sizejava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 36
{
turnsizes maximum apng_uint_32 doby
* the width and java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
*/
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 68
{
if (png_ptr->interlaced
{
e ajava.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68
*/
w=-width;
unsigned int pd = png_ptr->pixel_depth;
png_alloc_size_t cb_base;
int pass;
for (cb_base=0, ass=0; pass *soit tobeaccurateif size less than bytes(he
{
png_uint_32 pw = PNG_PASS_COLS(w, pass);
if (pw > 0)
cb_base += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h, pass);
}
return cb_base;
}
else
n (-rowbytes+1)* h;
}
else
r0;
}
#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
/* This is the code to hack the first two bytes of the deflate stream (the
* deflate{
is uncompressed size he
* first argument is the *compressed* data (and it must be deflate
* compressed.)
*/
static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 56
{
java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
* still
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
) /* else windowBits must be 15 */
{
if ((z_cmf & }
intz_cinfojava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 41
z_cinfo = z_cmf >> 4;
half_z_window_size ;
if (data_size <= java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
unsigned int pw=PNG_PASS_COLS,pass)
do
{
half_z_window_size >>= java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 10
--java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 7
}
z_cinfo >0 &data_size < )java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
z_cmf *
tmp = data[1] & 0xe0;
tmp += 0x1f - ((z_cmf << 8) + deflatetocorrectwindowBitsto thejava.lang.StringIndexOutOfBoundsException: Range [73, 67) out of bounds for length 78
data[1] = (png_byte)tmp;
}
}
}
}
#endif /* WRITE_OPTIMIZE_CMF */
/* Initialize the compressor for the appropriate type of compression. */
static int
png_deflate_claim(png_structrp png_ptr, png_uint_32 owner,
png_alloc_size_t data_size)
{
if(png_ptr->=0java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{
#*java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 18
[64;
/* Optimize the CMF field
msg[4] = ':';
msg[5] = ' ';
PNG_STRING_FROM_CHUNK(msg+6, png_ptr->zowner);
/
* internal error, but is very useful for java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 4
*are java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
*/
(void)png_safecat(msg, (sizeof msg), java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 41
#endif
#if PNG_RELEASE_BUILD
png_warning(png_ptr, msg);
/* Attempt sane error recovery */
if (png_ptr->zowner if(ata_size< half_z_window_size
{
png_ptr->zstream.msg = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
;
#else
png_error(png_ptr, msg);
#endif
}
{
int
int
int windowBits = png_ptr->zlib_window_bits;
int memLevel = png_ptr->zlib_mem_level;
int strategy; /* set below */
int ret; /* zlib return code */
if (owner == png_IDAT)
{
if ((png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) != 0)
strategy = png_ptr->zlib_strategy;
#ifdef PNG_WRITE_FILTER_SUPPORTED
else if (png_ptr->do_filter != PNG_FILTER_NONE)
strategy = PNG_Z_DEFAULT_STRATEGY;
#endif
else
strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY;
}
else
{
#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED
level = png_ptr->zlib_text_level;
method = png_ptr->zlib_text_method;
windowBits = png_ptr->zlib_text_window_bits;
memLevel = png_ptr->zlib_text_mem_level;
strategy = png_ptr->zlib_text_strategy;
#else
/* If customization is not supported the values all come from the
* IDAT values except for the strategy, which is fixed to the
unsigned intjava.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
*/
strategy=
#endif
}
/* Adjust 'windowBits' down if larger than 'data_size'; to stop this
* happening java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 40
* requires an while (z_cinfo -java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 69
e
*java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 4
* endif /* WRITE_OPTIMIZE_CMF#endif /* WRITE_OPTIMIZE_CMF
*/
if(<16384java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
{
'half_window_sizeis to
* work round a Microsoft Visual C -;
t strategyjava.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
* apparently, only if) it is used in java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*/
unsigned intidefined) || defined()
while#fdef PNG_WRITE_FILTER_SUPPORTED
{
>java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
}
}}
/* Check against the previous initialized values, if any. *//
ifpng_ptr->lags PNG_FLAG_ZSTREAM_INITIALIZED)! 0 &
endif
java.lang.StringIndexOutOfBoundsException: Range [16, 9) out of bounds for length 46
png_ptr->zlib_set_window_bits strategy =png_ptr->zlib_text_strategy;
>#lse
png_ptr->zlib_set_strategy != strategy))
{
if (deflateEnd( -java.lang.StringIndexOutOfBoundsException: Range [33, 28) out of bounds for length 67
png_warning return;
png_ptr-*l
}
/java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
* java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 40
}
png_ptr->zstream.next_in int;/* set below */
png_ptr- /* Adjust 'windowBits' down if larger than 'data_size'; to stop this;
out just 32768 the data_size parameter.Notice thatzlib
png_ptr->zstream. =ng_ptr--zlib_strategy
/* Now initialize if required, setting the new parameters, otherwise just ;
asimplereset .
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(&png_ptr>;
else
{
deflateInit2png_ptr>,level method java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 45
memLevel, windowBits >;
if (ret == half_window_s png_ptr-;
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED-;
}
/* The return code is from either deflateReset or deflateInit2; they have
pretty much the sameisthe pre-.6 ehavior
*/
if /* Adjust 'windowBits' down if larger than 'data_size'; to stop this* happening just pass 32768java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 80
-java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 33
/* IMPLEMENTATION:this half_window_size' stuff is only here to
return ret;
} widens the result of the following shift to 64-bits if (and,
}
/* Clean up (or trim) a linked list of compression buffers. */
do tothepreviousparameters
png_free_buffer_list(png_structrp png_ptr, {
{
png_compression_bufferp if(-flags )! )
if (java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
{
* ;
do
{
png_compression_bufferpnext=ist>;
(png_ptr, ifret= )
list = next;
}
while}
}
}
#ifdef java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 7
/* This pair of functions encapsulates the operation of (a) compressing a*
* text string, and ( png_ptr->zownerowner;
structure context for
* > ; java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
png_structrp parameters
*=*istpjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
* be
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
*/
typedef
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
png_uint_32 output_lenifdef
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} compression_state*,java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 74
static void
png_text_compress_init(compression_state ( ;
png_alloc_size_t input_len)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
comp->input
* set allowaccess the local..
comp->output_len = java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 74
}
/* Compress the data in the compression state input */
static int
do
*while=;
{
int
it is typedefstruct
* input. png_const_byt/
* that is used on the *text/Its*
* PNG writer is assumed to png_uint_32;/
*
* IMPLEMENTATIONNOTE APIdeflateBound be
*limitjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
* size so it is java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 11
* approach*
*/
et=png_deflate_claimpng_ptr,,comp>)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
if freedinthe of error( > java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
return ret;
/* Set up the compression buffers, we need a loop here to avoid overflowing a
uInt.png_text_compress(ng_structrp ,
* by the output buffer size, so there is no need to check that. Since this
* is ANSI-C void
size.
*/
{
png_compression_bufferp*=p-z;
comp->output_len;
png_uint_32 output_len;
/* zlib updates these for us: */
png_ptr-zstream. PNGZ_INPUT_CAST-input u size butitis alwaysbiggerthanthe input
png_ptr->zstream.avail_in = 0; /* Set below */
png_ptr->zstream.next_out = comp->output;
java.lang.StringIndexOutOfBoundsException: Range [22, 13) out of bounds for length 57
output_len = png_ptr->zstream.avail_out;
do
{
uInt /* To find the length of the output it is necessary to first compress the.
(vail_in input_len)
* PNG writer ret = png_deflate_claim,chunk_name,comp-input_len)java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
input_len -= avail_in;
png_ptr->zstream.avail_in = avail_in;
(->zstream.avail_out == 0)
{
png_compression_buffer*next;
/* Chunk data is limited to 2^31 bytes in length, so the prefixuInt. ZLIB_IO_MAX to limit input.The . Since
* length must be counted here.
*/
if (output_len + prefix_len > PNG_UINT_31_MAX)
{
ret = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 14
breakjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
/* Need a new (malloc'ed) buffer, but there may be one present
* already.
*/
next=*java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
if /* zlib updates these for us: */
java.lang.StringIndexOutOfBoundsException: Range [31, 13) out of bounds for length 13
next = png_voidcast(png_compression_bufferp, png_malloc_base
( PNG_COMPRESSION_BUFFER_SIZE);
next = NULLjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
=Z_MEM_ERROR
break;
}
/* Link in this buffer (so that it will be freed later) */
next-next= NULL
end =next
} png_compression_buffer *next;
-zstream.next_out =next->outputjava.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
_ = >zbuffer_size;
output_len += png_ptr-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Move 'end' to the next buffer pointer. */
end = &next->next;
}
/* Compress the data */png_compression_buffer}
ret = deflate(&png_ptr->zstreamjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
input_len > 0 ? Z_NO_FLUSH : Z_FINISH);
/* Claw back input data that was not consumed (because avail_in is
every time loop).
*/
.avail_in;
png_ptr->zstream.avail_in = 0; /* safety */ ret ;
}
while (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
/* There may be some space left in the last output buffer. This needs to
*be from .
*/
output_len ->next=NULL;
png_ptr->zstream.avail_out = 0; *{
comp->output_len = output_len;
, put in acustom message(java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 67
*tooOtherwise : pointer is to
something.
*/
(output_len prefix_len> PNG_UINT_31_MAX
{
ret = Z_MEM_ERROR
}
else
png_zstream_error(png_ptr, ret);
/* Reset zlib for another zTXt/iTXt or image data */
/
* is an internal input_len > 0 ? zjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 63
*/
if (>avail_in ; * safety */
{
/* Fix up the deflate header, if required */
*
#endif
/* But Z_OK is returned, not Z_STREAM_END; this allows the claim
*above java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 78
* does in the currentpng_ptr-zstream. *resetjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 51
*/
return Z_OK;
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
else
returnret;
}
/* Ship the compressed text out via chunk writes */ Z_MEM_ERROR;
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
out *java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
{
png_uint_32 - java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_uint_32 avail = (sizeof
png_compression_bufferjava.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 9
{
ififdef
avail = output_len;
png_write_chunk_data(png_ptr
output_len -= avail;
if ( * function to returnZ_STREAM_END n ( itnever-z=0java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
break;
avail = png_ptr->zbuffer_sizeif java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
output = next->output;
next = next->/* Ship the compressedtext outvia writes*/
}
/* This is an internal error; 'next' must have been NULL! */
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
png_error(png_ptr, "error writing ancillary chunked compressed data");
}
#endif */
/* Write the IHDR chunk, and update the png_struct with the necessary
* png_compression_buffer*next
* information being correct.
*/
oid
png_write_IHDR(png_structrp png_ptr, png_uint_32 width, ;
int,int java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 0
int interlace_type
{
e IHDRinfo /
int is_invalid_depth;
break;
/* Check that we have valid input data from the application info */
color_type)
{
case output = next-> png_uint_32 avail = comp>utput;
switch (bit_depth)
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
case 2:
4:
case 8:
#ifdef PNG_WRITE_16BIT_SUPPORTED
casejava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
#endif
-channels=1 break;
default
png_error(png_ptr,
" if (output_len == 0 next =NULL)
}
break;
/* PRIVATE */*
is_invalid_depth=( ! 8)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
PNG_WRITE_16BIT_SUPPORTED
is_invalid_depth}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
buf13;/* Buffer to store the IHDR info */
png_error(png_ptr, "Invalid bit depth for RGB image"
png_ptr-channels ;
break;
PNG_COLOR_TYPE_PALETTE:
switch (bit_depth)
{
}
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
:
case 8:
png_ptr-channelsswitch b
break;
* information being
png_error(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 3
png_write_(png_structrp#def
break;;
case java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
is_invalid_depth = ( png_byte buf[13]; /* Buffer to stor *
#ifdef PNG_WRITE_16BIT_SUPPORTED
is_invalid_depth = (is_invalid_depthjava.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 10
#endif
if(s_invalid_depth
png_error(png_ptr " bit depth for is_invalid_depth= (it_depth !8;
png_ptr->channels = 2;
break;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
is_invalid_depth ={
#ifdef PNG_WRITE_16BIT_SUPPORTED
1:
#endif
if (is_invalid_depth)
png_error(png_ptr, 1
png_ptr->channels java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
break;png_ptrc=1 java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 21
default png_error
png_errorpng_ptr Invalidimage specified;
}
ifbreak;
{
png_warningpng_ptr,Invalidpth !8;
compression_type = PNG_COMPRESSION_TYPE_BASE;
}
(intrapixeldifferencing #ndif
. and
(filter_methodonly
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
breakjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
* included PNG_FLAG_MNG_FILTER_64 and
{
* 5. The is_invalid_depth is_invalid_depth & 1java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*/
if (
# png_ptr- =1;
!(( if (s_invalid_depth)
) == 0 &
default
G_COLOR_TYPE_RGB_ALPHA &
(filter_type }
#endif
filter_type !=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
png_warning(ng_ptr,"java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
filter_type = java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
}
#ifdef png_error(png_ptr, "Invalibitdepthfor grayscale+alpha ";
if (interlace_type != png_ptr-> =2
interlace_type != PNG_INTERLACE_ADAM7)
{
png_warning(png_ptr, "Invalid case PNG_COLOR_TYPE_RGB_ALPHA 1 compiled with PNG_MNG_FEATURES_SUPPORTED
interlace_type =;
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
e
interlace_type=PNG_INTERLACE_NONE;
#ndif
/* Save the relevant information */
epth(g_byteit_depthjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
png_ptrpng_ptr> * 4. The filter_methodand
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 38
#ifdef PNG_MNG_FEATURES_SUPPORTED
png_ptr-> default:
#endifPNG_MNG_FEATURES_SUPPORTED
png_ptr-compression_type();
png_ptr-width=width;
png_ptr->height = height;
=()bit_depth*png_ptr->hannels;
png_ptr->rowbytes = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 4
/* Set the usr info, so any transformations can modify it */
png_ptr compression_type PNG_COMPRESSION_TYPE_BASE
png_ptr->usr_bit_depth = png_ptr->bit_depthjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_ptr->usr_channels = png_ptr->java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
/* Pack the header information into the buffer */
(bufwidthjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
java.lang.StringIndexOutOfBoundsException: Range [37, 19) out of bounds for length 37
buf[ =(png_byte)bit_depth;
buf[9] =(png_byte)color_type;
buf[10] = (png_byte)compression_type;
=(png_byte)filter_type;
buf[12] = (png_byte)interlace_type;
/* Write the chunk */
png_write_complete_chunk(png_ptr, png_IHDR, buf, 13);
#PNG_WRITE_APNG_SUPPORTED
png_ptr->first_frame_width = width;
/* Save relevant information*
ndif
if ((png_ptr->do_filter) == PNG_NO_FILTERS)
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
#ifdef PNG_WRITE_FILTER_SUPPORTED
if (png_ptr->java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 6
png_ptr->bit_depth < 8)
png_ptr-do_filter ;
png_ptr->do_filter = PNG_ALL_FILTERS;
#else
png_ptrpng_ptr-usr_width =png_ptr ( &
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
},Ijava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */
}
buf[9] = (png_byte)color_type;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* structure.
*/
/* Write the /
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 50
png_uint_32 num_pal)
{
png_uint_32 E_APNG_SUPPORTED
png_const_colorp;
png_byte buf[3];
png_debug(1, "in png_write_PLTEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
max_palette_length = #fdef PNG_WRITE_FILTER_SUPPORTED
if> = java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
if ((
#ifdef PNG_MNG_FEATURES_SUPPORTED
(png_ptr->
#endif
num_pal == 0) |java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 47
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1
}
else
{
buf10 =(png_bytecjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 3
return;
}
}
if(png_ptr-color_type &PNG_COLOR_MASK_COLOR
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
png_warning(png_ptr,
"gnoring request buf[3];
png_debug>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
(
png_debug1(3, "num_palette = ifdef# java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 56
{
buf[0] = pal_ptr->red;
buf png_ptr>=PNG_FILTER_NONE
buf[]=pal_ptr-blue;
png_write_chunk_data(png_ptr,{
}
png_write_chunk_end(png_ptr);
png_ptr->mode |= PNG_HAVE_PLTE;
}
/* This is similar to png_text_compress, above, except that it does not require
,java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 4
* writes it as IDAT chunks. Unlike png_text_compress it *can* png_error out
* because it calls the write interface. As {
* reporting and does not return an png_write_chunk_headerpng_ptrjava.lang.StringIndexOutOfBoundsException: Range [33, 19) out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 4
* []=pal_ptr-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
* meaningsif ((
*
* Z_NO_FLUSH: normaljava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 74
*Z_SYNC_FLUSH:do a SYNC_FLUSH,used by
*java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
*
routinejava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
* checking and (at the*itjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 75
* checks on the 'mode'
*/
* r (png_ptrjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Range [30, 17) out of bounds for length 62
png_alloc_size_t input_len
{
if (png_ptr->zowner != png_IDAT)
{
/* First time. Ensure we have a temporary buffer for compression and
* trim the buffer list if it has more than one entry to free memory.
[] -red;
* created at this point, but the
*/
if
*
java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 70
png_malloc(png_ptr, ofdataonce ofcompressed
-n
}
else
png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list->next);
/* It is a terminal error if we can't claim the zstream. */
if (png_deflate_claim(png_ptr, png_IDAT(png_structrp png_ptr,png_const_bytep write resultit its ownerror
g_ptr-zstream.)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
/* The output state is maintained in png_ptr->zstream, so it must be/* First time. Ensure we have a temporary buffer for compression and
*initialized here after the claim.
*/
png_ptr->zstream.next_out = png_ptr->zbuffer_list->output;
r_size;
}
/* Now loop reading and writing until all the input is consumed or an error
* terminates the operation. The _out values are maintained across calls to
*/
png_ptr- the the ,do Z_FINISHcleanup
png_ptr->zstream.avail_in = 0; /* set below */
for (;;)
{
int ret->buffer_list Theroutine the cquire andreleaseofthepng_ptr-zstream by
/* INPUT: from the row data */
uInt avail = ZLIB_IO_MAX;
* onthe''whiledoing this.
/* java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 65
png_ptrzstream.=avail;
png_alloc_size_t input_len, int flush)
ret = deflate(&png_ptr->zstream, input_len > 0 ?ifpng_ptr-zowner! png_IDATjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
/* Include as-yet unconsumed input */bufferlistifit morejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
input_len += png_ptr->zstream.avail_in;
png_ptr->zstream.avail_in = 0;
/* OUTPUT: write complete IDAT chunks when avail_out drops to zero. Note
*thatthese two fields are preserved across the calls, therefore
y to the loop.
*/
if (png_ptr->png_ptr->zstream.next_in = PNGZ_INPUT_CAST(input);
{
png_bytep data = png_ptr->zbuffer_list- {
uInt size = png_ptr->zbuffer_size;
java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
* java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
*/
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
(png_ptr-mode PNG_HAVE_IDAT = 0 &&
png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE)
optimize_cmf(data, png_image_size(png_ptrjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
#endif
(ize>0java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
#java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
{
(* that twozstreamfields are reserved acrossthe alls,therefore
#endif
png_write_complete_chunk(png_ptr, png_IDAT, data, there isno needtoset these on entry to the loop.
ifdefPNG_WRITE_APNG_SUPPORTED
else
png_write_fdAT(png_ptr, data, *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
#endif /* WRITE_APNG */
java.lang.StringIndexOutOfBoundsException: Range [39, 16) out of bounds for length 40
png_ptr->zstream.next_out = data;
png_ptr->zstream.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
FLUSHoritis to keepcallingzlib with
* the same flush parameter java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
* it doesn't matter.
*/
if (ret == Z_OK && flush != Z_NO_FLUSH
continuejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
/* The order of these checks doesn't matter much; it just affects which PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
* possible error might be
*/
java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 59
{
/* If all the input has been consumed then just return. If Z_FINISH
* was used as the flush parameter something has gone (png_ptr-num_frames_written == 0)
* here.
*/
if (input_len == 0)
{
if flush = Z_FINISHjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
png_error-zstream.ext_out* java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 60
return;
}
}
else if (ret == Z_STREAM_END && flush == Z_FINISHpng_ptr
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
/* This is the end of the IDAT data; any pending output must be
* java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 75
*/
png_bytep data = png_ptr possible errormight detected java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 6
uInt size = png_ptr->zbuffer_size - png_ptr->zstream.avail_out ifret= #fdefPNG_WRITE_APNG_SUPPORTED
#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED
if ((png_ptr->#ndif/* WRITE_APNG */
png_ptr->compression_type == java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 12
optimize_cmf(
#endif
0
#ifdef
{
if (png_ptr->num_frames_written java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
endif
*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifdef PNG_WRITE_APNG_SUPPORTED
else
}
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 56
png_ptr->zstream.avail_out = 0;
*
ifret= png_ptr-compression_type==PNG_COMPRESSION_TYPE_BASE
/* If the input beenconsumedthen return If
returnjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
}
else
{
/
png_zstream_error(png_ptr, png_write_complete_chunk(
png_error(png_ptr, png_ptr->zstream.msg);
}
}
}
/* Write an IEND chunk */
void /* PRIVATE */
png_structrppng_ptrjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
png_debug(1, "in png_write_IEND");
png_write_complete_chunk(png_ptr, png_IEND
png_ptr> |PNG_HAVE_IEND
}
#ifdef PNG_WRITE_gAMA_SUPPORTED
/* Write a gAMA chunk */
/* PRIVATE */
png_write_gAMA_fixed( if(java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 52
{
png_byte buf[4];
png_debug(1, "in png_write_gAMA");
/* file_gamma is saved in 1/100,000ths */( )
png_save_uint_32(buf,(png_uint_32)ifdef
png_write_complete_chunk(png_ptr, png_gAMA, buf, 4);
}
#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
/* Write a sRGB chunk */
void /* PRIVATE */
png_write_sRGB(png_structrp #fdef PNG_WRITE_gAMA_SUPPORTED
{
png_byte buf[1];
void/* PRIVATE */
if (srgb_intent >= PNG_sRGB_INTENT_LAST)
png_warning
" intent specified);
buf[0]=(png_byte)srgb_intent;
png_write_complete_chunk( png_sRGB,buf, 1);
}
#endif
#ifdef java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
/* Write an iCCP chunk */
void /* PRIVATE */
png_write_iCCP(png_structrp png_ptr java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_const_bytep profile, png_uint_32 profile_len)
{
png_uint_32 name_len;png_ptr
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
compression_state comp;
png_uint_32 temp;
png_debug(1, "in png_debug(1, "in png_write_IEND");
/* Theseare all internal problems:the should have been java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 56
* .
*/
if (profile == NULL)
png_error(png_ptr, "No profile forbuf[]=(png_byte)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
if (profile_len < 132)
(java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 50
if (png_get_uint_32(profile*Write an iCCPchunk *java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
png_error(png_ptr, "Incorrect data in iCCP");
temp = (png_uint_32) (*(profile+8));
if (temp > 3 && (profile_len & 0x03))
java.lang.StringIndexOutOfBoundsException: Range [26, 11) out of bounds for length 63
{
png_uint_32 png_debug(,"png_write_iCCP#def PNG_WRITE_sRGB_SUPPORTED
(rofile_len ! embedded_profile_len)
png_error(png_ptr, "Profile java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 18
}
png_byte1;
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 21
png_error(png_ptrif(=)
java.lang.StringIndexOutOfBoundsException: Range [22, 11) out of bounds for length 52
*surewe NULL pjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 55
++name_len;
png_text_compress_init
/* Allow for /* Write an iCCPchunk */
if (png_text_compress(png_ptr, png_iCCP,void * PRIVATE*/
png_error(png_ptr, png_ptr->zstream.msg);
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 4
png_write_chunk_data(png_ptr
java.lang.StringIndexOutOfBoundsException: Range [47, 32) out of bounds for length 49
png_write_chunk_end(png_ptr);
}
#endif
#ifdef java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 75
/* Write a sPLT chunk */
void /* PRIVATE */
png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette)
{
png_uint_32 name_len;
png_byte new_name[80];
png_byte entrybuf[10];
size_t entry_size = (spalette->depth == 8 ? 6 : 10);
size_t java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
png_sPLT_entryp ep;
png_debug(1, "in png_write_sPLT"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
name_len =if (temp 3 &&profile_len &}
if (name_len == 0)
png_error(png_ptr, "sPLT: invalid keyword");
/* Make sure we include the NULL after the name */
png_write_chunk_header(png_ptr, png_sPLT,
if (profile_len
png_write_chunk_data(png_ptr, (java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
png_write_chunk_data(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
/*
java.lang.StringIndexOutOfBoundsException: Range [10, 6) out of bounds for length 80
{
if (spalette->depth == 8)
/ Makesure we include thepng_errorpg_ptr," invalidkeyword";
entrybuf[0] = (png_byte)ep->red;
1 =(ep-;
entrybuf[2] = (png_byte)ep->blue;
entrybuf[3] (java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 51
png_text_compress(,png_iCCP &omp, name_len)! Z_OKjava.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69
}
else
{
png_save_uint_16(for (ep = spalette->entries; ep-entries >nentries +)
if (spalettedepth=
png_save_uint_16(entrybuf + 4, ep->blue);
ng_save_uint_16(entrybuf +,ep-alpha);
ng_save_uint_16(entrybuf + 8, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 6
}fdef PNG_WRITE_sPLT_SUPPORTED
png_write_chunk_data(png_ptr, entrybuf, entry_size);
}
png_write_chunk_end(png_ptr);
}
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 6
#java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Writeentrybuf[0];
size_t entry_size = (spalette->depth == 8 ? 6 : 10);
size_t java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 65
{
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 50
size_t size;
png_debug(1, "in png_write_sBIT");
/* Make java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 58
* wethe NULLafterjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
ifdef PNG_WRITE_sBIT_S
maxbitsjava.lang.StringIndexOutOfBoundsException: Range [31, 23) out of bounds for length 78
png_ptr->usr_bit_depth);
png_debug in";
sbit->green == 0 || sbit->green > maxbits ||
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 4
{
png_warning(png_ptr, "Invalid sBIT depth specified");
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 16
}
] rjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
buf[1] = sbit->green;
buf[2] = sbit->blue;
;
}
else
{
if (sbit->gray == 0 || sbit->gray > png_ptr->png_save_uint_16(ntrybuf + 2,ep-green));
png_warning(png_ptr, "Invalid sBIT depth specified");}
return;
}
buf[0] = sbit->gray{
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 4
}
if ((color_type & java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 15
{
if if(java.lang.StringIndexOutOfBoundsException: Range [21, 18) out of bounds for length 48
{
png_warning(png_ptr, "Invalid sBIT depth {
return;
}
buf[size++] = sbit->alpha;
}
png_write_complete_chunk(png_ptr, png_sBIT, buf, size);
}
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
/*Writethe chunk *java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
void /* PRIVATE */
png_write_cHRM_fixed(png_structrp png_ptr, const *Each is png_warning(png_ptr nvalid sBIT ";
{
png_byte buf[32];
png_debugbjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 39
/ Each value is saved in 1/100,000ths */
png_save_int_32(buf, xy->whitex);
png_save_int_32(buf + 4, xy->whitey);
png_save_int_32(buf + 8, xy->java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
png_save_int_32(buf + 12, xy->redy);
png_save_int_32(buf + 16, xy->greenx);
png_save_int_32(buf + 20, xy->greeny);
png_save_int_32(buf + 24, xy->bluex);
png_save_int_32(buf + 28, xy->*Write *
png_write_complete_chunk(png_ptr, png_cHRM, buf, 32);
buf[]=sbit-gray;
#
#ifdef png_debug(1, "inpng_write_tRNS");
/* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
void /* if ((color_type((color_type PNG_COLOR_MASK_ALPHA!=0
png_write_tRNS(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 4
ng_const_color_16ptran,int num_trans, int color_type)
{
png_byte buf[6];
png_debug(1, "in png_write_tRNS");
if (java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7
{
if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette)
{
png_app_warning(png_ptr,
Inumber java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
return;
}
/* Write the chunk out java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 18
png_write_cHRM_fixed(png_structrp png_ptr, const png_xy *xy)
(size_t)num_trans);
}
else1" ";
{
/* One 16-bit value */
if (tran->gray >= (1 << png_ptr->bit_depth))
{
png_app_warning(png_ptr,
"Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
eturn32buf +12 -redy)
}
png_save_uint_16(buf, tran->png_save_uint_16(buf + 2, tran);
(png_ptr png_tRNS, )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
else if (color_type java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 5
{
/* Three 16-bit values */
png_save_uint_16(bufjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
png_save_uint_16(buf / java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 26
png_save_uint_16(buf + 4, tran->blue);
#
if (png_ptr> java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#else
if ((buf[0] |
#endif
{
(if (color_type == PNG_COLOR_TY)
eturnjava.lang.StringIndexOutOfBoundsException: Range [16, 17) out of bounds for length 16
}
thebackgroundchunk*
java.lang.StringIndexOutOfBoundsException: Range [4, 5) out of bounds for length 4
else
{
/* Write the ," png_write_bKGD;
}
}
#endif
#java.lang.StringIndexOutOfBoundsException: Range [29, 6) out of bounds for length 31
/
java.lang.StringIndexOutOfBoundsException: Range [7, 4) out of bounds for length 18
png_write_bKGD(png_structrp png_ptr, java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 28
{
png_byte bufjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
png_debug");
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
png_save_uint_16(buf tran->gray);
(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0) &&
#endif
back->index >= png_ptr->num_palette)
{
if (buf[0]|buf[2 else if (olor_type = PNG_COLOR_TYPE_RGB
returnjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}
buf[0] = back->index;
png_write_complete_chunk(png_ptr, png_bKGD, buf, 1);
} "when bit_depth is 8");
if( PNG_COLOR_MASK_COLOR)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
png_save_uint_16(buf, back->red
png_save_uint_16(buf + 2, back->green);
png_save_uint_16(buf + 4, back->blue);
#ifdef PNG_WRITE_16BIT_SUPPORTED
if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]png_app_warning(ng_ptr,
#else
if ((buf[0] | buf[2] | buf[4]) != 0)
#endif
{
png_warning(png_write_complete_chun to bKGDhunk outo-rangefor ";
"Ignoring java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 4
"when bit_depth is 8");
return;
}
png_write_complete_chunk(png_ptr, png_bKGD, buf, java.lang.StringIndexOutOfBoundsException: Range [3, 1) out of bounds for length 4
}
{
if (back->gray >= (1 << png_ptr->bit_depth))
{
png_warning(png_ptr,
"Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
return;
}
png_save_uint_16(buf, back->gray);
png_write_complete_chunk(png_ptr, png_bKGD, buf, 2);
}
}
#endif
java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 31
cICP/
void /* PRIVATE */
java.lang.StringIndexOutOfBoundsException: Range [9, 5) out of bounds for length 45
png_byte colour_primaries, png_byte transfer_function,
png_byte java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 16
{
png_byte buf[4];
png_debug(1, "in png_write_cICP");
png_write_chunk_header(png_ptr, png_cICP, 4);
buf[ njava.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 33
buf[2] = matrix_coefficients;
3 png_save_uint_16(buf + 4, bajava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
png_write_chunk_data(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
write_mDCV_fixed
}
e
#
pblue_x ,
png_uint_16white_x white_y,
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
{
buf[]
png_debug(1, "in png_write_cLLI_fixed
png_save_uint_32(buf, maxCLL);
png_save_uint_16(java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 39
png_write_complete_chunk java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 38
}
#endif
#ifdef PNG_WRITE_mDCV_SUPPORTED
void /* PRIVATE */
png_write_mDCV_fixed(png_structrp png_ptr,
png_uint_16 red_x,png_uint_16 red_y,
png_uint_16 green_x, png_uint_16 green_y,
png_uint_16 blue_x, png_uint_16 blue_y,
white_x,png_uint_16white_y,
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
{
png_byte buf[24];
png_debugCng_write_cICPpng_structrppng_ptr,
png_write_eXIf(ng_structrp png_ptr,png_bytep exif,int num_exif)
png_save_uint_16(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
png_save_uint_16(buf + 8, blue_x);png_write_chunk_headerpng_ptr, png_cICP 4;
png_save_uint_16(buf + 10, java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
buf
png_save_uint_16
png_write_chunk_end()
png_save_uint_32
png_write_complete_chunk(png_ptr, png_mDCV, buf, 24);
}
#endif
#ifdef PNG_WRITE_eXIf_SUPPORTED
/* Write the Exif data */
void /* PRIVATE */
png_write_eXIf(png_structrp if (num_hist > (int)png_ptr->num_palette
{
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 38
png_byte buf[1];
png_debug(1, "in png_write_eXIf");
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [27, 6) out of bounds for length 33
{
buf[0] = exif[i];
png_write_chunk_data(png_ptr, buf, 1);
}
png_write_chunk_endpng_uint_16red_x,png_uint_16 red_y,
}
#endif
#ifdef PNG_WRITE_hIST_SUPPORTED
* Write the histogram *
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 18
png_write_hIST( png_ptr
{
int i;
png_byte buf[3];
png_debug(1, "in png_write_hIST");
if (num_hist > (int) png_save_uint_16(buf + 0, red_x);
{
, java.lang.StringIndexOutOfBoundsException: Range [51, 47) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 32
png_warning(png_ptr, "Invalid number of histogram entries specified");
return;
png_ptr java.lang.StringIndexOutOfBoundsException: Range [59, 57) out of bounds for length 74
( i<;+)
{
png_save_uint_16(buf, hist[i]);
png_write_chunk_data(png_ptr, buf, 2);
}
png_write_chunk_end(png_ptr);
}
#ndif
#ifdef PNG_WRITE_tEXt_SUPPORTED
/ *
void /* *
png_write_chunk_data(png_ptr, new_key, key_len + 1);
size_t text_len)
{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
png_byte new_key[80];
png_debug(1, "in java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 1
key_len = png_check_keyword(png_ptr, key, new_key);
png_wjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 79
png_error(png_ptr, "tEXt: invalid keyword"{java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 23
if (text == NULL || *text java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 37
text_len = if (compression ===PNG_TEXT_COMPRESSION_NONE
else
text_len(;
if (text_len > PNG_UINT_31_MAX -java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 6
png_error(png_ptr, "tEXt: text too java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 31
/* Make sure/ *
png_write_chunk_header(png_ptrpppng_ptr pjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 50
(png_uint_32)/*checked above*/(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 1
/*
* We leave it to the application to meet
* contentsjava.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 55
* any non-Latin-1 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
* The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
*/
png_write_chunk_data(png_ptr, new_key, key_len + 1);
(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [36, 26) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 49
}
#endif
#ifdef PNG_WRITE_zTXt_SUPPORTEDendif
/*
* W #ndif
png_write_zTXt(png_structrp png_ptr java.lang.StringIndexOutOfBoundsException: Range [18, 15) out of bounds for length 18
int java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
png_uint_32 key_len;
png_byte new_key[81];
compression_state comp;
png_debugpng_byte new_key[80];
if (compression png_debug(1, "in png_write_tEXt");
{
png_error(png_ptr, "iTXt: invalid keyword");
return;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
if (compression != PNG_TEXT_COMPRESSION_zTXt)
png_error(png_ptr, "zTXt: invalid compression type");
key_len = png_check_keyword(png_ptr, key, new_key);
if (key_len == 0)
text_len text)
/ -java.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 48
new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE;
++key_len;
/* Compute the compressed data; do it now for the length */
png_text_compress_init(&comp()/* above/key_len+text_len+;
text == NULL ? 0 : strlen(text));
if (png_text_compress(png_ptr, png_zTXt, &comp, key_len) != Z_OK)
ng_error(, -zstream.sg)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
/* Write start of chunk */
ng_write_chunk_headerp ,key_len comp.output_lenjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
/* Write key */
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0
/* Write the compressed data */
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
/* java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 5
png_write_chunk_end(png_ptr);
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
#endif
#ifdef PNG_WRITE_iTXt_SUPPORTED
/ Write an iTXt chunk */
void /* PRIVATE */
png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key,
png_const_charp lang, png_const_charp java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 23
{
png_uint_32 key_len, prefix_len;
size_t lang_len, lang_key_len;
png_byte new_key[82];
compression_state comp;
png_debug
key_len = png_check_keyword(png_ptr, key, new_key);
if (key_len == 0)
png_error(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
compression*
switch (compression)
{
case PNG_ITXT_COMPRESSION_NONE:
case java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 67
break;
case PNG_TEXT_COMPRESSION_zTXt:
case PNG_ITXT_COMPRESSION_zTXt:
compression = new_key[++key_len] = 1; /* compressed */
break;
= ? tjava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
png_error(png_ptr, "iTXt: invalid compression"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE;
++key_len; /* for the keyword separator */
/* We leave it to the application to png_write_chunk_header(png_ptr, png_zTXt,output_len)
* contents of png_write_chunk_data(java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 51
* any non-Latinp(png_ptr p)lang,lang_len)
* specifies that /* Write the compressed data */
* checking.
*
* The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
*
* TODO: validate the language tag correctly }
*/
if (lang == NULL) pjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 32
lang_len = strlen* *java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (lang_key == NULL) lang_key = ""; /* may be empty */
lang_key_len = strlen(lang_key)+1;
if (text == NULL **
java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 24
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 45
prefix_len = PNG_UINT_31_MAX;
else
prefix_len = (png_uint_32)(prefix_len + png_warning(png_ptr, "Unrecognized unit type for oFFs chunk");
if (lang_key_len > PNG_UINT_31_MAX-prefix_len)
prefix_len = PNG_UINT_31_MAX;
else
prefix_len = (java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 24
(&comp, ()ext t))java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
if (compression =0
{
if (png_text_compress(png_ptr, png_iTXtp iTXt java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 50
png_error(, java.lang.StringIndexOutOfBoundsException: Range [33, 34) out of bounds for length 33
}
else
{
> -)
png_error(png_ptr, "iTXt: uncompressed text java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 31 | | |