summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/hotwayd/files/hotwayd-0.8-headerfix.patch')
-rw-r--r--net-mail/hotwayd/files/hotwayd-0.8-headerfix.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/net-mail/hotwayd/files/hotwayd-0.8-headerfix.patch b/net-mail/hotwayd/files/hotwayd-0.8-headerfix.patch
new file mode 100644
index 000000000000..347e8e003054
--- /dev/null
+++ b/net-mail/hotwayd/files/hotwayd-0.8-headerfix.patch
@@ -0,0 +1,24 @@
+--- hotwayd-0.8.orig/commands.c 2004-02-07 06:44:05.000000000 -0500
++++ hotwayd-0.8/commands.c 2004-10-03 15:53:25.636497904 -0400
+@@ -961,12 +961,16 @@
+
+ char *grow_and_copy(char *dest, int curpos, char *src, int i)
+ {
+- if(!(dest = realloc(dest, curpos+i+1)))
++ char* temp = 0;
++ if(!(temp = malloc(curpos+i+1)))
+ return NULL;
+-
+- strlcat(dest, src, curpos+i+1);
+-
+- return dest;
++
++ memcpy(temp, dest, curpos);
++ memcpy(temp+curpos, src, i);
++ temp[curpos+i] = '\0';
++
++ free(dest);
++ return temp;
+ }
+
+ int proxy_sanity_check(void) {