Changeset 35826 in vbox
- Timestamp:
- Feb 3, 2011 8:17:33 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/socket.c
r35346 r35826 870 870 struct sockaddr_in host_addr; 871 871 #endif 872 caddr_t buf ;872 caddr_t buf = 0; 873 873 int mlen; 874 874 … … 921 921 922 922 /* Don't care what port we get */ 923 /* 924 * > nmap -sV -T4 -O -A -v -PU3483 255.255.255.255 925 * generates bodyless messages, annoying memmory management system. 926 */ 923 927 mlen = m_length(m, NULL); 924 buf = RTMemAlloc(mlen); 925 if (buf == NULL) 926 { 927 return -1; 928 } 929 m_copydata(m, 0, mlen, buf); 928 if (mlen > 0) 929 { 930 buf = RTMemAlloc(mlen); 931 if (buf == NULL) 932 { 933 return -1; 934 } 935 m_copydata(m, 0, mlen, buf); 936 } 930 937 ret = sendto(so->s, buf, mlen, 0, 931 938 (struct sockaddr *)&addr, sizeof (struct sockaddr)); 932 RTMemFree(buf); 939 if (buf) 940 RTMemFree(buf); 933 941 if (ret < 0) 934 942 {
Note:
See TracChangeset
for help on using the changeset viewer.