Skip to content

fix: binary file check misses binary files where first byte is null#1054

Merged
keegancsmith merged 1 commit into
sourcegraph:mainfrom
jaywgraves:jg/fix_binary_checking
May 4, 2026
Merged

fix: binary file check misses binary files where first byte is null#1054
keegancsmith merged 1 commit into
sourcegraph:mainfrom
jaywgraves:jg/fix_binary_checking

Conversation

@jaywgraves
Copy link
Copy Markdown
Contributor

@jaywgraves jaywgraves commented May 3, 2026

While searching for a short string of text, it returned some TTF files. I downloaded one from the source repo and checked it locally with a hex viewer to confirm. A bit of poking around revealed this logic bug.

I found a second more recent instance of the same bug that seems to be a copy/paste error.

While searching for a short string of text, it returned some TTF files.
I downloaded one from the source repo and checked it locally with a hex
viewer to confirm. A bit of poking around this logic bug.

I found a second more recent instance of the same bug that seems to be
a copy/paste error.
Copy link
Copy Markdown
Member

@keegancsmith keegancsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ouch! Nice find.

@keegancsmith keegancsmith merged commit 5baf7e2 into sourcegraph:main May 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants