Mailing List Archive

NessusClient/nessus comm.c,1.10.2.6,1.10.2.7
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv89001

Modified Files:
Tag: release-1-0
comm.c
Log Message:
do not call realloc() on a pointer pointing on static data

Index: comm.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/comm.c,v
retrieving revision 1.10.2.6
retrieving revision 1.10.2.7
diff -u -d -r1.10.2.6 -r1.10.2.7
--- comm.c 2 Oct 2006 13:56:50 -0000 1.10.2.6
+++ comm.c 21 Dec 2006 15:30:35 -0000 1.10.2.7
@@ -467,9 +467,12 @@
* the server string */
value = estrdup(v);
else {
+ char * p;
/* append the stuff before the found substring to value */
s[0] = 0;
- value = (char *) erealloc(value, strlen(value) + 1 + strlen(v) + 1);
+ p = emalloc( strlen(value) + 1 + strlen(v) + 1);
+ strncpy(p, value, strlen(value));
+ value = p;
value = strcat(value, ";");
value = strcat(value, v);


_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs