comparison src/toc.c @ 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 35796808896a
children af60432518a6
comparison
equal deleted inserted replaced
331:f3c8d79688db 332:b573f33c5e0e
874 permit = NULL; 874 permit = NULL;
875 deny = NULL; 875 deny = NULL;
876 bud = NULL; 876 bud = NULL;
877 877
878 /* skip "CONFIG:" (if it exists)*/ 878 /* skip "CONFIG:" (if it exists)*/
879
880 if (config != NULL) {
879 881
880 c = strncmp(config + sizeof(struct sflap_hdr),"CONFIG:",strlen("CONFIG:"))? 882 c = strncmp(config + sizeof(struct sflap_hdr),"CONFIG:",strlen("CONFIG:"))?
881 strtok(config, "\n"): 883 strtok(config, "\n"):
882 strtok(config + sizeof(struct sflap_hdr)+strlen("CONFIG:"), "\n"); 884 strtok(config + sizeof(struct sflap_hdr)+strlen("CONFIG:"), "\n");
883 do { 885 do {
910 #endif 912 #endif
911 913
912 serv_add_buddies(bud); 914 serv_add_buddies(bud);
913 serv_set_permit_deny(); 915 serv_set_permit_deny();
914 916
917 }
918
915 /* perhaps the server dropped the buddy list, try importing from 919 /* perhaps the server dropped the buddy list, try importing from
916 cache */ 920 cache */
917 921
918 if ( how_many == 0 && !from_do_import ) { 922 if ( how_many == 0 && !from_do_import ) {
919 do_import( (GtkWidget *) NULL, 0 ); 923 do_import( (GtkWidget *) NULL, 0 );