Skip to content

Commit 06ce5fa

Browse files
authored
Merge branch 'main' into fix_GetDatabasePath_leak
2 parents 6df5af5 + 68e5248 commit 06ce5fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/interfaces/libpq/fe-secure-gssapi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,8 @@ pqsecure_open_gss(PGconn *conn)
585585

586586
PqGSSRecvLength += ret;
587587

588+
Assert(PqGSSRecvLength < PQ_GSS_RECV_BUFFER_SIZE);
589+
PqGSSRecvBuffer[PqGSSRecvLength] = '\0';
588590
appendPQExpBuffer(&conn->errorMessage, "%s\n", PqGSSRecvBuffer + 1);
589591

590592
return PGRES_POLLING_FAILED;

0 commit comments

Comments
 (0)