79697942

Date: 2025-07-11 07:02:38
Score: 2
Natty:
Report link

I just want to append on Remy's answer (as I don't have enough reputation to add a comment):

Passing pointer to the result of TEncoding.Default.GetBytes into C is highly dangerous and buggy.

The result bytes are not zero terminated.

Possible fix is zero terminating the buffer yourself, such as:

SetLength(buffer, Length(buffer) + 1);
buffer[High(buffer)] := 0;
Reasons:
  • RegEx Blacklisted phrase (1.5): I don't have enough reputation
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: user29880284