mirror of
				https://git.code.sf.net/p/libpng/code.git
				synced 2025-07-10 18:04:09 +02:00 
			
		
		
		
	[libpng16] Undo faulty attempt to stifle oss-fuzz complaint about
png_icc_check_tabler()
This commit is contained in:
		
							parent
							
								
									413de0a56a
								
							
						
					
					
						commit
						a7722aee32
					
				
							
								
								
									
										13
									
								
								png.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								png.c
									
									
									
									
									
								
							@ -816,14 +816,14 @@ png_get_copyright(png_const_structrp png_ptr)
 | 
				
			|||||||
#else
 | 
					#else
 | 
				
			||||||
#  ifdef __STDC__
 | 
					#  ifdef __STDC__
 | 
				
			||||||
   return PNG_STRING_NEWLINE \
 | 
					   return PNG_STRING_NEWLINE \
 | 
				
			||||||
      "libpng version 1.6.33beta04 - September 14, 2017" PNG_STRING_NEWLINE \
 | 
					      "libpng version 1.6.33beta04 - September 16, 2017" PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
 | 
					      "Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
 | 
				
			||||||
      PNG_STRING_NEWLINE \
 | 
					      PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
 | 
					      "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
 | 
				
			||||||
      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
 | 
					      "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
 | 
				
			||||||
      PNG_STRING_NEWLINE;
 | 
					      PNG_STRING_NEWLINE;
 | 
				
			||||||
#  else
 | 
					#  else
 | 
				
			||||||
   return "libpng version 1.6.33beta04 - September 14, 2017\
 | 
					   return "libpng version 1.6.33beta04 - September 16, 2017\
 | 
				
			||||||
      Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
 | 
					      Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
 | 
				
			||||||
      Copyright (c) 1996-1997 Andreas Dilger\
 | 
					      Copyright (c) 1996-1997 Andreas Dilger\
 | 
				
			||||||
      Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
 | 
					      Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
 | 
				
			||||||
@ -2208,18 +2208,15 @@ png_icc_check_tag_table(png_const_structrp png_ptr, png_colorspacerp colorspace,
 | 
				
			|||||||
   png_uint_32 tag_count = png_get_uint_32(profile+128);
 | 
					   png_uint_32 tag_count = png_get_uint_32(profile+128);
 | 
				
			||||||
   png_uint_32 itag;
 | 
					   png_uint_32 itag;
 | 
				
			||||||
   png_const_bytep tag = profile+132; /* The first tag */
 | 
					   png_const_bytep tag = profile+132; /* The first tag */
 | 
				
			||||||
   png_uint_32 tag_start = 0;
 | 
					 | 
				
			||||||
   png_uint_32 tag_id = 0;
 | 
					 | 
				
			||||||
   png_uint_32 tag_length = 0;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
   /* First scan all the tags in the table and add bits to the icc_info value
 | 
					   /* First scan all the tags in the table and add bits to the icc_info value
 | 
				
			||||||
    * (temporarily in 'tags').
 | 
					    * (temporarily in 'tags').
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
   for (itag=0; itag < tag_count; ++itag, tag += 12)
 | 
					   for (itag=0; itag < tag_count; ++itag, tag += 12)
 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
      tag_id = png_get_uint_32(tag+0);
 | 
					      png_uint_32 tag_id = png_get_uint_32(tag+0);
 | 
				
			||||||
      tag_length = png_get_uint_32(tag+8);/* not padded */
 | 
					      png_uint_32 tag_length = png_get_uint_32(tag+8);/* not padded */
 | 
				
			||||||
      tag_start = png_get_uint_32(tag+4); /* must be aligned */
 | 
					      png_uint_32 tag_start = png_get_uint_32(tag+4); /* must be aligned */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      /* The ICC specification does not exclude zero length tags, therefore the
 | 
					      /* The ICC specification does not exclude zero length tags, therefore the
 | 
				
			||||||
       * start might actually be anywhere if there is no data, but this would be
 | 
					       * start might actually be anywhere if there is no data, but this would be
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user