1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

Do a SMB_ASSERT() in cli_nt_session_open() when the pipe index is out

of range instead of silently failing.
(This used to be commit b5111f47b5cf1820550e17663f983674b67bcaff)
This commit is contained in:
Tim Potter 2002-10-17 05:08:34 +00:00
parent 4af2e30ecf
commit e7c011412b

View File

@ -1253,8 +1253,9 @@ BOOL cli_nt_session_open(struct cli_state *cli, const int pipe_idx)
SMB_ASSERT(cli->nt_pipe_fnum == 0);
if ( (pipe_idx < 0) || (pipe_idx >= PI_MAX_PIPES) )
return False;
/* The pipe index must fall within our array */
SMB_ASSERT((pipe_idx >= 0) && (pipe_idx < PI_MAX_PIPES));
if (cli->capabilities & CAP_NT_SMBS) {
if ((fnum = cli_nt_create(cli, &pipe_names[pipe_idx].client_pipe[5], DESIRED_ACCESS_PIPE)) == -1) {