[hackers] [sent] initialize .img || Szabolcs Nagy

From: <git_AT_suckless.org>
Date: Tue, 10 Nov 2015 16:58:21 +0100 (CET)

commit 4ca44387e65a96a93b56ed1491f5f90c5e25d948
Author: Szabolcs Nagy <nsz_AT_port70.net>
AuthorDate: Mon Nov 9 02:58:26 2015 +0100
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Tue Nov 10 16:55:22 2015 +0100

    initialize .img
    
    without the attached patch ./sent example segfaults here

diff --git a/sent.c b/sent.c
index 1b3b8f2..fb0b56e 100644
--- a/sent.c
+++ b/sent.c
_AT_@ -394,6 +394,8 @@ void load(FILE *fp)
                         die("cannot strdup %u bytes:", strlen(buf)+1);
                 if (slides[i].text[0] == '_AT_')
                         slides[i].img = pngopen(slides[i].text + 1);
+ else
+ slides[i].img = 0;
                 i++;
         }
         if (slides)
Received on Tue Nov 10 2015 - 16:58:21 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 10 2015 - 17:00:15 CET