mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-23 15:18:33 +00:00
Detect binary attachments better
This fix eliminates a false test failure on some platforms and makes the binary test work properly whether characters with the high bit set, when treated as integers, are negative or not.
This commit is contained in:
parent
80fa4e01a1
commit
9261f3b922
@ -1188,7 +1188,7 @@ void runtest(int n, char const* filename1, char const* arg2)
|
||||
bool is_binary = false;
|
||||
for (size_t i = 0; i < data.size(); ++i)
|
||||
{
|
||||
if (data[i] < 0)
|
||||
if ((data[i] < 0) || (data[i] > 126))
|
||||
{
|
||||
is_binary = true;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user