microsoft / sarif-sdk

.NET code and supporting files for working with the 'Static Analysis Results Interchange Format' (SARIF, see https://github.com/oasis-tcs/sarif-spec)
Other
193 stars 91 forks source link

Fix IsTextualData() callers. #2779

Closed scottoneil-ms closed 7 months ago

scottoneil-ms commented 7 months ago

Previously callers of the binary classifier were confusing the length field to refer to the bytes in the buffer instead of characters to decode. This corrects that. It also changes the API to be aware of the file extent of the buffer to avoid scanning data that might not be initialized.