pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/chat/ircII



Module Name:    pkgsrc
Committed By:   mrg
Date:           Fri Apr 26 00:12:14 UTC 2019

Modified Files:
        pkgsrc/chat/ircII: distinfo
Added Files:
        pkgsrc/chat/ircII/patches: patch-source_server.c

Log Message:
avoid a crash when setting IRCIISERVER.  older free() must hae been
less grumpy about passing data it didn't know about ..

pointed out by bad@.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 pkgsrc/chat/ircII/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/ircII/patches/patch-source_server.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/chat/ircII/distinfo
diff -u pkgsrc/chat/ircII/distinfo:1.50 pkgsrc/chat/ircII/distinfo:1.51
--- pkgsrc/chat/ircII/distinfo:1.50     Fri Jan 18 10:47:48 2019
+++ pkgsrc/chat/ircII/distinfo  Fri Apr 26 00:12:14 2019
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.50 2019/01/18 10:47:48 mrg Exp $
+$NetBSD: distinfo,v 1.51 2019/04/26 00:12:14 mrg Exp $
 
 SHA1 (ircii-20190117.tar.bz2) = 5e727cecd311117b0768586d37bf2126fb0fd7b7
 RMD160 (ircii-20190117.tar.bz2) = 2536c7783ca2ee9df0b49877858b65ccfc3e9bea
 SHA512 (ircii-20190117.tar.bz2) = 08ca96cd62bae35245b40791c8588752b96136b53e5c9434d0f7976d03841fca80e8c83cf8608aad79c381820b06e00167447c6dc0c6294c6b3dfd91a9fdb6d4
 Size (ircii-20190117.tar.bz2) = 606327 bytes
 SHA1 (patch-Makefile.in) = 77fd2cfb1ef528faf03a3ef61c4802917fb6c8d5
+SHA1 (patch-source_server.c) = cfcaac144030c1c5ed907e940026dbdefc6897f4

Added files:

Index: pkgsrc/chat/ircII/patches/patch-source_server.c
diff -u /dev/null pkgsrc/chat/ircII/patches/patch-source_server.c:1.1
--- /dev/null   Fri Apr 26 00:12:14 2019
+++ pkgsrc/chat/ircII/patches/patch-source_server.c     Fri Apr 26 00:12:14 2019
@@ -0,0 +1,36 @@
+$NetBSD: patch-source_server.c,v 1.1 2019/04/26 00:12:14 mrg Exp $
+
+- Don't free data that came from the environment.
+
+Index: source/server.c
+===================================================================
+RCS file: /home/cvs/ircii/source/server.c,v
+retrieving revision 1.245
+retrieving revision 1.246
+diff -p -u -r1.245 -r1.246
+--- source/server.c    5 Feb 2019 01:35:49 -0000       1.245
++++ source/server.c    26 Apr 2019 00:08:33 -0000      1.246
+@@ -1796,17 +1796,19 @@ read_server_file(void)
+ {
+       FILE *fp;
+       u_char format[11];
+-      u_char *file_path = NULL;
++      u_char *file_path;
++      u_char *free_path = NULL;
+       u_char  buffer[FS_BUFFER_SIZE];
+ 
+       if ((file_path = my_getenv("IRCSERVERSFILE")) == NULL)
+       {
+-              malloc_strcpy(&file_path, my_irc_lib());
+-              malloc_strcat(&file_path, UP(SERVERS_FILE));
++              malloc_strcpy(&free_path, my_irc_lib());
++              malloc_strcat(&free_path, UP(SERVERS_FILE));
++              file_path = free_path;
+       }
+       snprintf(CP(format), sizeof format, "%%%ds", (int)sizeof buffer);
+       fp = fopen(CP(file_path), "r");
+-      new_free(&file_path);
++      new_free(&free_path);
+       if (NULL != fp)
+       {
+               while (fscanf(fp, CP(format), buffer) != EOF)



Home | Main Index | Thread Index | Old Index