From: Harvie Date: Tue, 18 Jan 2011 13:20:48 +0000 (+0100) Subject: Fixed crash (NULL pointer dereference) X-Git-Url: http://git.harvie.cz/?p=mirrors%2Flibpurple-core-answerscripts.git;a=commitdiff_plain;h=d94bfdb410a902979226266c5f74b38c1c30380d;ds=sidebyside Fixed crash (NULL pointer dereference) --- diff --git a/answerscripts.c b/answerscripts.c index 25d6cd6..54b7576 100755 --- a/answerscripts.c +++ b/answerscripts.c @@ -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__