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
1a3d7c77
Commit
1a3d7c77
authored
Jan 15, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Allow NULL networkaddr and endpoint in rpcrt4_np_get_top_of_tower.
Add tests for this.
parent
7b40fd64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
rpc_transport.c
dlls/rpcrt4/rpc_transport.c
+10
-4
rpc.c
dlls/rpcrt4/tests/rpc.c
+10
-0
No files found.
dlls/rpcrt4/rpc_transport.c
View file @
1a3d7c77
...
...
@@ -422,8 +422,8 @@ static size_t rpcrt4_ncacn_np_get_top_of_tower(unsigned char *tower_data,
TRACE
(
"(%p, %s, %s)
\n
"
,
tower_data
,
networkaddr
,
endpoint
);
networkaddr_size
=
strlen
(
networkaddr
)
+
1
;
endpoint_size
=
strlen
(
endpoint
)
+
1
;
networkaddr_size
=
networkaddr
?
strlen
(
networkaddr
)
+
1
:
1
;
endpoint_size
=
endpoint
?
strlen
(
endpoint
)
+
1
:
1
;
size
=
sizeof
(
*
smb_floor
)
+
endpoint_size
+
sizeof
(
*
nb_floor
)
+
networkaddr_size
;
if
(
!
tower_data
)
...
...
@@ -437,7 +437,10 @@ static size_t rpcrt4_ncacn_np_get_top_of_tower(unsigned char *tower_data,
smb_floor
->
protid
=
EPM_PROTOCOL_SMB
;
smb_floor
->
count_rhs
=
endpoint_size
;
memcpy
(
tower_data
,
endpoint
,
endpoint_size
);
if
(
endpoint
)
memcpy
(
tower_data
,
endpoint
,
endpoint_size
);
else
tower_data
[
0
]
=
0
;
tower_data
+=
endpoint_size
;
nb_floor
=
(
twr_empty_floor_t
*
)
tower_data
;
...
...
@@ -448,7 +451,10 @@ static size_t rpcrt4_ncacn_np_get_top_of_tower(unsigned char *tower_data,
nb_floor
->
protid
=
EPM_PROTOCOL_NETBIOS
;
nb_floor
->
count_rhs
=
networkaddr_size
;
memcpy
(
tower_data
,
networkaddr
,
networkaddr_size
);
if
(
networkaddr
)
memcpy
(
tower_data
,
networkaddr
,
networkaddr_size
);
else
tower_data
[
0
]
=
0
;
tower_data
+=
networkaddr_size
;
return
size
;
...
...
dlls/rpcrt4/tests/rpc.c
View file @
1a3d7c77
...
...
@@ -374,6 +374,16 @@ static void test_towers(void)
I_RpcFree
(
address
);
I_RpcFree
(
tower
);
/* test the behaviour for np with no address */
ret
=
TowerConstruct
(
&
mapi_if_id
,
&
ndr_syntax
,
"ncacn_np"
,
"
\\
pipe
\\
test"
,
NULL
,
&
tower
);
ok
(
ret
==
RPC_S_OK
,
"TowerConstruct failed with error %ld
\n
"
,
ret
);
ret
=
TowerExplode
(
tower
,
NULL
,
NULL
,
NULL
,
NULL
,
&
address
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %ld
\n
"
,
ret
);
ok
(
!
strcmp
(
address
,
""
),
"address was
\"
%s
\"
instead of
\"\"\n
"
,
address
);
I_RpcFree
(
address
);
I_RpcFree
(
tower
);
}
static
void
test_I_RpcMapWin32Status
(
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