File libidmef-0.7.2_idmefxml_bufferoverflow_detection.diff of Package libidmef

--- idmefxml.c.orig	2008-10-09 11:36:21.000000000 +0200
+++ idmefxml.c	2008-10-09 11:38:10.000000000 +0200
@@ -3669,7 +3669,7 @@
   /** Now seek back to the beginning... Nice little hack **/
   rewind(f);
     
-  idmef_alertid_string = (char *) calloc(MAX_ALERTID_BUFFER_SIZE,sizeof(char));
+  idmef_alertid_string = (char *) calloc(MAX_ALERTID_BUFFER_SIZE+1,sizeof(char));
 
   if(fgets(idmef_alertid_string, MAX_ALERTID_BUFFER_SIZE + 1, f) == NULL)
   {
openSUSE Build Service is sponsored by