CID 1224785: unsafe EOF detection.
Fixes #11691. Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
73b2a864b9
commit
8e948cb398
@ -232,9 +232,9 @@ ClipboardApp::Copy(const char *string)
|
||||
|
||||
if (string == NULL) {
|
||||
// read from standard input
|
||||
char c;
|
||||
int c;
|
||||
while ((c = fgetc(stdin)) != EOF) {
|
||||
inputString += c;
|
||||
inputString += (char) c;
|
||||
}
|
||||
|
||||
string = inputString.String();
|
||||
|
Loading…
Reference in New Issue
Block a user