Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bf407105
Commit
bf407105
authored
Apr 17, 2009
by
Jeff Latimer
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: WSAAddressToStringA should return length of ANSI address string and…
ws2_32: WSAAddressToStringA should return length of ANSI address string and should include the trailing null.
parent
fcde02f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
socket.c
dlls/ws2_32/socket.c
+2
-1
sock.c
dlls/ws2_32/tests/sock.c
+2
-0
No files found.
dlls/ws2_32/socket.c
View file @
bf407105
...
...
@@ -4805,7 +4805,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
p
=
strchr
(
buffer
,
':'
);
if
(
!
((
SOCKADDR_IN
*
)
sockaddr
)
->
sin_port
)
*
p
=
0
;
size
=
strlen
(
buffer
);
size
=
strlen
(
buffer
)
+
1
;
if
(
*
lenstr
<
size
)
{
...
...
@@ -4814,6 +4814,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
return
SOCKET_ERROR
;
}
*
lenstr
=
size
;
strcpy
(
string
,
buffer
);
return
0
;
}
...
...
dlls/ws2_32/tests/sock.c
View file @
bf407105
...
...
@@ -1296,6 +1296,7 @@ static void test_WSAAddressToStringA(void)
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
strcmp
(
address
,
expect1
),
"Expected: %s, got: %s
\n
"
,
expect1
,
address
);
ok
(
len
==
sizeof
(
expect1
),
"Expected size to be %d, got %d
\n
"
,
sizeof
(
expect1
),
len
);
len
=
sizeof
(
address
);
...
...
@@ -1329,6 +1330,7 @@ static void test_WSAAddressToStringA(void)
ok
(
!
ret
,
"WSAAddressToStringA() failed unexpectedly: %d
\n
"
,
WSAGetLastError
()
);
ok
(
!
strcmp
(
address
,
expect4
),
"Expected: %s, got: %s
\n
"
,
expect4
,
address
);
ok
(
len
==
sizeof
(
expect4
),
"Expected size to be %d, got %d
\n
"
,
sizeof
(
expect4
),
len
);
}
static
void
test_WSAAddressToStringW
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment