Serious command processor bug

This is definitely the weirdest bug I've seen in 12 years! We lost a full day just tracking down this issue.


We found that cmd.exe silently drops the 8191st char of a long enough command. Furthermore, this bug occurs in Windows 7 clients as well.


This simple batch echoes a sequence of zeroes and ones, clearly exposing this bug:

@echo 01010101010101010101
@pause > nul

8191test.png


Best regards,

George Weinburg

May 24th, 2015 8:34am

Hi George,

I have tried to make a test according to your descriptions on my Winodws 7 machine(x64,x32) and Windows 8.1 machine. Both of them share the same symptom as yours, but I made more tests.

1.I changed the first char "0" to "1", the last char will be "1" all the time.
2.I tried to shorten the chars one by one both from the top and the end. I found that the output will be shorten, too.
3.I tried to modify all the chars to "0" then "1". For the "0"scenerio, the last char will be "0".But both of them will meet the same limit.(I didn`t count one by one,I counted the last line, both of them are "31" chars.)

According to these testing, we can make a conclusion that there is a limit of the output. If the output over the limit and the rest of the chars isn`t a zero number(test 3), they will be replaced with "1".

For the test 2, it seems that there is still something to dig out.

Best regards

Free Windows Admin Tool Kit Click here and download it now
June 1st, 2015 5:39am

That's interesting MeipoXu, thanks!

We should add that this issue doesn't depend on numbers, it happens with any command as well.

8191text.png

June 1st, 2015 7:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics