CID 1224785: unsafe EOF detection.
Fixes #11691. Signed-off-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
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();
|
||||
|
||||
Reference in New Issue
Block a user