Skip to content

Commit

Permalink
Error check for invalid TDS login request
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuntal Ghosh committed Aug 28, 2024
1 parent 3605cae commit 4b4d697
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/babelfishpg_tds/src/backend/tds/tdslogin.c
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@ FetchLoginRequest(LoginRequest request)
return STATUS_ERROR;

/* Check we indeed got the correct packet */
Assert(TdsCheckMessageType(TDS_LOGIN7));
if (!TdsCheckMessageType(TDS_LOGIN7))
return STATUS_ERROR;

/* fix the client version now */
request->clientProVersion = pg_bswap32(request->clientProVersion);
Expand Down

0 comments on commit 4b4d697

Please sign in to comment.