Re: File-Compare "fc" falsely reports mismatch between identical files

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"Rich Pasco" <richp1234@xxxxxxxxxxx> wrote in message
news:O1ZzeNE7JHA.5780@xxxxxxxxxxxxxxxxxxxxxxx
foxidrive wrote:

It is conceivable that a fairly large binary file may not contain a CR/LF
pair and so the buffer overflows when comparing in text mode.

Certainly possible, but would two copies of the same file overflow in
different places? Apparently that's what happened.

Interestingly,
fc IMG_0001.dcm.raw file.bin
reported differences, but
fc file.bin IMG_0001.dcm.raw
reported match identically

- Rich

Intriguing. I've seen FC do strange things in the past - comparing A against
B giving different results from B against A, but didn't have time to
investigate the problem.

The only difference I see in this case is the filename length - what happens
if both filenames have the same length, both as 8.3 names and long
filenames?

May be clutching at straws, but perhaps the buffer is shared between the
filename and the data read; fine for real-world ASCII but not for binary
being interpreted as line-oriented ASCII.


.



Relevant Pages