From d94bfdb410a902979226266c5f74b38c1c30380d Mon Sep 17 00:00:00 2001 From: Harvie Date: Tue, 18 Jan 2011 14:20:48 +0100 Subject: [PATCH 1/1] Fixed crash (NULL pointer dereference) --- answerscripts.c | 4 ++++ 1 file changed, 4 insertions(+) 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__ -- 2.30.2