Comments (5)
from libpng.
Problem seems to exist only in the libpng16 branch.
from libpng.
Reopening this issue because there are two more checks that could be omitted.
File pngrutil.c, line 1588:
else if (size > 0)
Unsigned variable is not equal to 0, therefore the condition is always true. Though it could be left as a comment.
File pngwrite.c, line 1943:
int write_16bit = linear && !colormap && (display->convert_to_8bit == 0);
!colormap was already evaluated in linear variable.
from libpng.
Agreed about !colormap.
The "size > 0" gave some trouble with Coverity so I'm not so sure about that.
I'll make a Coverity run with the change now and see what happens.
from libpng.
Looking at the old code in pngrutil.c it might be expected to see:
#ifndef __COVERITY__
errmsg = png_ptr->zstream.msg;
#endif
}
else
errmsg = "truncated";
from libpng.
Related Issues (20)
- Feature Request - graceful error returns for reading/writing images HOT 5
- bug: png_check_sig API changed in 1.6.41 HOT 13
- How to disable warnings
- libpng: APIs that are currently used HOT 8
- 1.6.42: test sute fails in one unit HOT 39
- LoongArch LSX: Follow up on checking for compiler intrinsics inside ./configure HOT 6
- Possible miscalculation of buffer length in `png_icc_profile_error` HOT 3
- Questions about choosing zlib over other compression algorithms and other issues HOT 6
- Use PNG_ABORT instead of abort in png_safe_error HOT 3
- CMake: How to configure options for pnglibconf generation? HOT 4
- Need to restore STDERR in pngtest.c HOT 3
- 16-bit channels, possible issue? HOT 7
- Minor Syntax Issues in the `/libpng/contrib/gregbook` HOT 1
- Possible integer overflow in pngtests.c HOT 2
- Implicit fallthroughs HOT 8
- libpng version 1.6.43 dll only worked on the debugged version.crashed with the released version. HOT 3
- [Build][CMake][Windows] Issue to build on Windows when cygwin (awk ) is present in the PATH HOT 4
- libpng-1.6.43.tar.gz is corrupt HOT 2
- Sovereign Tech Fund: Fellowship for Maintainers
- Potential Vulnerability in libpng Leading to Hang or Infinite Loop when Processing Malformed PNG Files HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpng.