severity 333214 grave
tags 333214 patch
thanks

Hi, please apply the patch attached.


Greetings,

-- 
[EMAIL PROTECTED]: ~$ grep -ir 'power in your hands' /proc/
/proc/version: Debian GNUine Perception

BOFH excuse #356: the daemons! the daemons! the terrible daemons!.


diff -ur knocker-0.7.1/src/knocker_conf.c knocker-0.7.1.new/src/knocker_conf.c
--- knocker-0.7.1/src/knocker_conf.c	2002-05-24 01:58:45.000000000 +0200
+++ knocker-0.7.1.new/src/knocker_conf.c	2007-07-15 02:14:17.000000000 +0200
@@ -223,6 +223,8 @@
 {
   char *tmpp = malloc (strlen (line));
   char *p = malloc (strlen (line));
+  char *tmpp_orig = tmpp;
+  char *p_orig = p;
 
   /* Check if the option is present in the line */
   tmpp = strstr (line, opt);
@@ -234,7 +236,7 @@
 
   if (!_isblank (*tmpp) || *tmpp != KNOCKER_OPTION_TOKEN)
     {
-      free (tmpp);
+      free (tmpp_orig);
       return 0;
     }
 
@@ -247,8 +249,7 @@
 
   strcpy (value, p);
 
-  /* free(p); this cause knocker to segfault */
-  /* well I have to know why... */
+  free(p_orig);
 
   return 1;
 }

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to