[Title] prevent : Argument cannot be negative
authorSooyoung Ha <yoosah.ha@samsung.com>
Mon, 7 Jan 2013 07:42:44 +0000 (16:42 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Mon, 7 Jan 2013 07:42:44 +0000 (16:42 +0900)
[Desc.] add return code when fail to create socket.
[Issue] Prevent CID 33477

src/emuld.c

index f164b28..e44a866 100644 (file)
@@ -1182,7 +1182,10 @@ void send_guest_server(char* databuf)
        }
 
        if ((s=socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP))==-1)
-                 LOG("socket error!");
+       {
+               LOG("socket error!");
+               return;
+       }
            
        memset((char *) &si_other, 0, sizeof(si_other));
        si_other.sin_family = AF_INET;