Fixed crash (NULL pointer dereference)
authorHarvie <tomas@mudrunka.cz>
Tue, 18 Jan 2011 13:20:48 +0000 (14:20 +0100)
committerHarvie <tomas@mudrunka.cz>
Tue, 18 Jan 2011 13:20:48 +0000 (14:20 +0100)
answerscripts.c

index 25d6cd6..54b7576 100755 (executable)
@@ -117,6 +117,10 @@ static void received_im_msg_cb(PurpleAccount *account, char *who, char *buffer,
        //Launch job on background
        answerscripts_job *job = (answerscripts_job*) malloc(sizeof(answerscripts_job));
        job->pipe = popen(hook_script, "r");
+       if(job->pipe == NULL) {
+               fprintf(stderr,"Can't execute %s\n", hook_script);
+               return;
+       }
        job->conv = conv;
 
        #ifndef __WIN32__
This page took 0.102051 seconds and 4 git commands to generate.