tmbinc / bgrep

Binary Grep
http://debugmo.de/2009/04/bgrep-a-binary-grep/
368 stars 57 forks source link

possible bug in dump_context error message #8

Closed devinacker closed 3 years ago

devinacker commented 8 years ago

https://github.com/tmbinc/bgrep/blob/master/bgrep.c#L106-L108

int bytes_read = read(fd, buf, read_chunk);

if (bytes_to_read < 0)

That should be comparing bytes_read instead of bytes_to_read, right?

tmbinc commented 8 years ago

Ack. Seems like a bug.