changeset 332:b573f33c5e0e

[gaim-migrate @ 342] James Nicolson pointed out a potential segfault if the server sends back CONFIG and not CONFIG:toc_whatever... committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sat, 03 Jun 2000 19:30:31 +0000
parents f3c8d79688db
children af60432518a6
files src/toc.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/toc.c	Sat Jun 03 07:25:42 2000 +0000
+++ b/src/toc.c	Sat Jun 03 19:30:31 2000 +0000
@@ -877,6 +877,8 @@
         
         /* skip "CONFIG:" (if it exists)*/
 
+	if (config != NULL) {
+
         c = strncmp(config + sizeof(struct sflap_hdr),"CONFIG:",strlen("CONFIG:"))?
 			strtok(config, "\n"):
 			strtok(config + sizeof(struct sflap_hdr)+strlen("CONFIG:"), "\n");
@@ -912,6 +914,8 @@
 	serv_add_buddies(bud);
         serv_set_permit_deny();
 
+	}
+
 	/* perhaps the server dropped the buddy list, try importing from
            cache */