[Commits] [SCM] claws branch, master, updated. 3.17.3-191-g098ecbb

Michael Rasmussen mir at datanom.net
Sun Jul 7 11:10:28 CEST 2019

Hi Colin,

On Sun,  7 Jul 2019 10:52:21 +0200 (CEST)
colin at claws-mail.org (Colin) wrote:

Maybe I am slow but does code below not contain a logical bomb ?

+GdkPixbuf *procmime_get_part_as_pixbuf(MimeInfo *mimeinfo, GError
**error) +{
+       GdkPixbuf *pixbuf;
+       GInputStream *stream;
+       *error = NULL;
+       stream = procmime_get_part_as_inputstream(mimeinfo);
+       if (stream == NULL) {
+               return NULL;
+       }

If stream is NULL you return NULL but error is NULL as well so if
caller checks against error == NULL to prevent continuing with a
NULL-pointer their code might fail since C specifically states that
operating on a NULL pointer is undefined behaviour.

Michael Rasmussen

Get my public GnuPG keys:
michael <at> rasmussen <dot> cc
mir <at> datanom <dot> net
mir <at> miras <dot> org
/usr/games/fortune -es says:
Those who hate and fight must stop themselves -- otherwise it is not
stopped. -- Spock, "Day of the Dove", stardate unknown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/commits/attachments/20190707/f34c3bdd/attachment.sig>

More information about the Commits mailing list