# HG changeset patch # User Daniel Atallah # Date 1136777805 0 # Node ID ab00cea25ef2149514d453cda1558237d33f15ed # Parent a90255f676521e110dc944f65407d5b55fa68dfa [gaim-migrate @ 15117] I think this is what was actually intended in get_my_ip(). Likewise with simple_udp_process(), although I don't think it'd be possible to use that extra byte anyway. committer: Tailor Script diff -r a90255f67652 -r ab00cea25ef2 src/protocols/simple/simple.c --- a/src/protocols/simple/simple.c Sun Jan 08 22:50:34 2006 +0000 +++ b/src/protocols/simple/simple.c Mon Jan 09 03:36:45 2006 +0000 @@ -68,8 +68,7 @@ if(!tmp || !strcmp(tmp,"0.0.0.0")) { tmp = gaim_network_get_my_ip(-1); } - if(!tmp) strcpy(my_ip, "0.0.0.0"); - strcpy(my_ip, tmp); + strcpy(my_ip, tmp ? tmp : "0.0.0.0"); return my_ip; } @@ -1113,7 +1112,7 @@ time_t currtime; static char buffer[65536]; - if((len = recv(source, buffer, 65536, 0)) > 0) { + if((len = recv(source, buffer, sizeof(buffer) - 1, 0)) > 0) { buffer[len] = '\0'; gaim_debug_info("simple","\n\nreceived - %s\n######\n%s\n#######\n\n",ctime(&currtime), buffer); msg = sipmsg_parse_msg(buffer);