An open API service indexing awesome lists of open source software.

https://github.com/maximus5/ms-bug-2

Broken text in console input buffer
https://github.com/maximus5/ms-bug-2

Last synced: 3 months ago
JSON representation

Broken text in console input buffer

Awesome Lists containing this project

README

          

# conhost console input bug

Some console applications use `ReadFile` WinApi function or its wrappers.

The problem is that when console **input** buffer is filled by `WriteConsoleInput` with ‘long’ strings (e.g. URL-s, code snippets, etc.), `ReadFile` returns broken data.

This sample application illustrates the problem.

It writes 65-chars long string into console input buffer in one thread and read input buffer in the another thread.

0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ|||

If your Windows has this bug, you'll see `?` or some other errors instead or inside characters of the expected string.
These error characters are highlighted - black text on red background.

![Example of output](https://github.com/Maximus5/ms-bug-2/blob/master/example.png)

### References

* https://github.com/Maximus5/issues/760
* https://github.com/Maximus5/conemu-old-issues/issues/903