diff options
author | Shav Kinderlehrer <[email protected]> | 2023-04-12 22:53:48 -0400 |
---|---|---|
committer | Shav Kinderlehrer <[email protected]> | 2023-04-12 22:53:48 -0400 |
commit | c760493f48e4f8c6fd9f3effb5082d263128548c (patch) | |
tree | 9895ddecf5f0848094351642a531772dcb3b8b9f | |
parent | b247f8f827656462899c96422bffe1d85a6d64f6 (diff) | |
download | lat-c760493f48e4f8c6fd9f3effb5082d263128548c.tar.gz lat-c760493f48e4f8c6fd9f3effb5082d263128548c.zip |
Fix binary detection bugv0.3.3
-rw-r--r-- | src/lib/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/file.c b/src/lib/file.c index 494e740..72b7fac 100644 --- a/src/lib/file.c +++ b/src/lib/file.c @@ -40,7 +40,7 @@ struct filedata readfile(FILE *fp) { // guess if printable // from https://github.com/sharkdp/content_inspector/blob/master/src/lib.rs - int testlen = 64; + int testlen = f.len >= 64 ? 64 : f.len; char *testbuf[testlen]; memcpy(testbuf, f.buf, testlen); |