CID 732047 Negative array index write release-2.x.y
authorDaniel Atallah <datallah@pidgin.im>
Sat, 16 Mar 2013 14:05:51 -0400
branchrelease-2.x.y
changeset932b985540e9 pushlog
parent 4d139ce8f7ec
child 23cbfff68a0c
CID 732047 Negative array index write
libpurple/stun.c
     1.1 --- a/libpurple/stun.c
     1.2 +++ b/libpurple/stun.c
     1.3 @@ -175,7 +175,7 @@
     1.4  	struct sockaddr_in *sinptr;
     1.5  
     1.6  	len = recv(source, buffer, sizeof(buffer) - 1, 0);
     1.7 -	if (!len) {
     1.8 +	if (len < 0) {
     1.9  		purple_debug_warning("stun", "unable to read stun response\n");
    1.10  		return;
    1.11  	}