Committer : isomer
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-12-30 11:06:19 UTC
Modified files:
ChangeLog ircd/convert-conf.c
Log message:
Author: Isomer <[EMAIL PROTECTED]>
Log message:
If the config has a H: without a C: then convert-conf would printf a NULL
char *, causing core dumps on some platforms, and bogus output on others.
This outputs a message warning, skips the connection, and continues.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.761 ircu2.10/ChangeLog:1.762
--- ircu2.10/ChangeLog:1.761 Thu Dec 29 14:13:10 2005
+++ ircu2.10/ChangeLog Fri Dec 30 03:06:08 2005
@@ -1,3 +1,8 @@
+2005-12-31 Perry Lorier <[EMAIL PROTECTED]>
+
+ * convert-conf.c: Skip with a warning, H:'s that are missing a
+ corresponding C:
+
2005-12-29 Michael Poole <[EMAIL PROTECTED]>
* configure.ac: ircd/test/Makefile is a new output file.
Index: ircu2.10/ircd/convert-conf.c
diff -u ircu2.10/ircd/convert-conf.c:1.5 ircu2.10/ircd/convert-conf.c:1.6
--- ircu2.10/ircd/convert-conf.c:1.5 Tue Dec 13 15:38:39 2005
+++ ircu2.10/ircd/convert-conf.c Fri Dec 30 03:06:09 2005
@@ -213,6 +213,14 @@
{
for (sl = conn->origins; sl; sl = sl->next)
fprintf(stdout, "# %s\n", sl->value);
+ if (conn->name == NULL
+ || conn->host == NULL
+ || conn->password == NULL
+ || conn->class == NULL) {
+ fprintf(stderr,"H:line missing C:line for %s\n",sl->value);
+ continue;
+ }
+
fprintf(stdout,
"Connect {\n\tname =\"%s\";\n\thost = \"%s\";\n"
"\tpassword = \"%s\";\n\tclass = \"%s\";\n",
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches