Skip to content
Commit d5fc7e3c authored by Philip Withnall's avatar Philip Withnall 🚫
Browse files

io-ico: Add an assertion to clarify potential NULL pointer dereference

At a first read through, it looks like the call to OneLine() could end
up dereferencing context->pixbuf when it’s NULL. However, due to a
combination of other checks in the caller, OneLine() will only be called
after DecodeHeader() has set context->pixbuf to a valid object.
Otherwise, if DecodeHeader() bails with an error, the pixbuf will never
be dereferenced.

Add a comment trying to explain this, and an assertion which backs it up
more rigorously.

Coverity ID: 1388531

https://bugzilla.gnome.org/show_bug.cgi?id=777374
parent 71e3b4a4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment