Skip to content

Commit

Permalink
Reduce outer buffer loop size to avoid scans outside of buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
dcamper committed Sep 19, 2024
1 parent a6964f3 commit 8c9e06b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/remote/rmtsmtp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ class CMailInfo
{
// Walk the buffer, looking for the STARTTLS option
char* buffPtr = inbuff;
while (buffPtr < (inbuff + inlen))
while (buffPtr < (inbuff + inlen - 12)) // 12 == '250 STARTTLS'
{
if (strncmp(buffPtr, "250", 3) == 0)
{
Expand Down

0 comments on commit 8c9e06b

Please sign in to comment.