summaryrefslogtreecommitdiff
path: root/textproc/modlogan/files/patch-fix_segfault
diff options
context:
space:
mode:
Diffstat (limited to 'textproc/modlogan/files/patch-fix_segfault')
-rw-r--r--textproc/modlogan/files/patch-fix_segfault57
1 files changed, 57 insertions, 0 deletions
diff --git a/textproc/modlogan/files/patch-fix_segfault b/textproc/modlogan/files/patch-fix_segfault
new file mode 100644
index 000000000000..4f957af033d4
--- /dev/null
+++ b/textproc/modlogan/files/patch-fix_segfault
@@ -0,0 +1,57 @@
+Index: mconfig.c
+===================================================================
+RCS file: /cvsroot/modlogan/modlogan/src/mconfig.c,v
+retrieving revision 1.40
+diff -c -r1.40 mconfig.c
+*** src/mconfig.c 2001/09/23 22:54:00 1.40
+--- src/mconfig.c 2001/09/24 09:29:37
+***************
+*** 665,670 ****
+--- 665,672 ----
+ int mconfig_free(mconfig *conf) {
+ if (!conf) return -1;
+
++ mplugins_free(conf);
++
+ if (conf->outputdir) free(conf->outputdir);
+
+ #ifdef HAVE_LIBADNS
+***************
+*** 672,678 ****
+ if (conf->adns) free(conf->adns);
+ if (conf->query_hash) mhash_free(conf->query_hash);
+ #endif
+- mplugins_free(conf);
+ mlist_free(conf->loadplugins);
+ mlist_free(conf->includepath);
+
+--- 674,679 ----
+Index: misc.c
+===================================================================
+RCS file: /cvsroot/modlogan/modlogan/src/misc.c,v
+retrieving revision 1.13
+diff -c -r1.13 misc.c
+*** src/misc.c 2001/09/04 22:47:23 1.13
+--- src/misc.c 2001/09/24 09:29:37
+***************
+*** 278,283 ****
+--- 278,285 ----
+ /* x and y denote the position in source respective destination string */
+ register int x, y;
+ unsigned char *str;
++
++ if (!s) return NULL;
+
+ /* allocate memory for encoded string */
+ str = (unsigned char *) malloc(3 * strlen(s) + 1);
+***************
+*** 307,312 ****
+--- 309,316 ----
+ /* work pointers */
+ unsigned char *data;
+ unsigned char *dest;
++
++ if (!s) return NULL;
+
+ /* allocate memory for decoded string */
+ str = (unsigned char *) malloc(strlen(s) + 1);