From 8e948cb39818d2a11f87b846096b976fd391adb1 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Sat, 27 Dec 2014 18:00:23 +0100 Subject: [PATCH] CID 1224785: unsafe EOF detection. Fixes #11691. Signed-off-by: Adrien Destugues --- src/bin/clipboard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/clipboard.cpp b/src/bin/clipboard.cpp index 87f15ca68d..d46ce71fa2 100644 --- a/src/bin/clipboard.cpp +++ b/src/bin/clipboard.cpp @@ -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();