mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Worked around a false-positive Coverity issue in pngvalid.c.
This commit is contained in:
parent
d189b54e30
commit
7190c4f5af
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.27beta01 - December 29, 2015
|
||||
Libpng 1.5.27beta01 - January 13, 2016
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@ -26,7 +26,7 @@ Other information:
|
||||
|
||||
Changes since the last public release (1.5.26):
|
||||
|
||||
version 1.5.27beta01 [December 29, 2015]
|
||||
version 1.5.27beta01 [January 13, 2016]
|
||||
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
|
||||
in the BigEndian tests by not testing it, making the BE code the same
|
||||
as the LE version.
|
||||
@ -45,6 +45,7 @@ version 1.5.27beta01 [December 29, 2015]
|
||||
This changes pngvalid to use BE random numbers; this used to produce
|
||||
errors but these should not be fixed as a result of the previous changes.
|
||||
In projects/vstudio, combined readme.txt and WARNING into README.txt
|
||||
Worked around a false-positive Coverity issue in pngvalid.c.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
3
CHANGES
3
CHANGES
@ -4454,7 +4454,7 @@ version 1.5.26rc01 [December 14, 2015]
|
||||
version 1.5.26 [December 17, 2015]
|
||||
No changes.
|
||||
|
||||
version 1.5.27beta01 [December 29, 2015]
|
||||
version 1.5.27beta01 [January 13, 2016]
|
||||
Removed LE/BE dependencies in pngvalid, to 'fix' the current problem
|
||||
in the BigEndian tests by not testing it, making the BE code the same
|
||||
as the LE version.
|
||||
@ -4473,6 +4473,7 @@ version 1.5.27beta01 [December 29, 2015]
|
||||
This changes pngvalid to use BE random numbers; this used to produce
|
||||
errors but these should not be fixed as a result of the previous changes.
|
||||
In projects/vstudio, combined readme.txt and WARNING into README.txt
|
||||
Worked around a false-positive Coverity issue in pngvalid.c.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
|
||||
/* pngvalid.c - validate libpng by constructing then reading png files.
|
||||
*
|
||||
* Last changed in libpng 1.5.27 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2014-2015 Glenn Randers-Pehrson
|
||||
* Last changed in libpng 1.6.21 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2014-2016 Glenn Randers-Pehrson
|
||||
* Written by John Cunningham Bowler
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
@ -309,8 +309,13 @@ static void r16(png_uint_16p p16, size_t count)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __COVERITY__
|
||||
# define R16(this)\
|
||||
r16(&(this), (sizeof (this))/2U/*(sizeof (png_uint_16))*/)
|
||||
#else
|
||||
# define R16(this)\
|
||||
r16(&(this), (sizeof (this))/(sizeof (png_uint_16)))
|
||||
#endif
|
||||
|
||||
#if defined PNG_READ_RGB_TO_GRAY_SUPPORTED ||\
|
||||
defined PNG_READ_FILLER_SUPPORTED
|
||||
@ -326,8 +331,14 @@ static void r32(png_uint_32p p32, size_t count)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __COVERITY__
|
||||
# define R32(this)\
|
||||
r32(&(this), (sizeof (this))/4U/*(sizeof (png_uint_32))*/)
|
||||
#else
|
||||
# define R32(this)\
|
||||
r32(&(this), (sizeof (this))/(sizeof (png_uint_32)))
|
||||
#endif
|
||||
|
||||
#endif /* READ_FILLER || READ_RGB_TO_GRAY */
|
||||
|
||||
#endif /* READ || WRITE_tRNS || WRITE_FILTER */
|
||||
@ -6370,6 +6381,8 @@ transform_range_check(png_const_structp pp, unsigned int r, unsigned int g,
|
||||
|
||||
png_error(pp, message);
|
||||
}
|
||||
|
||||
UNUSED(limit)
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user