|
From: rainbyte <rai...@us...> - 2012-07-17 10:51:04
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jul 6 04:50:10 2012 +0300
Fix reading of key from stdin in gh_fsb_decrypt (not tested, probably never used, but fixes a compiler warning).
---
tools/gh_fsb/fsbext.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/tools/gh_fsb/fsbext.c b/tools/gh_fsb/fsbext.c
index 1d46227..ee561d8 100644
--- a/tools/gh_fsb/fsbext.c
+++ b/tools/gh_fsb/fsbext.c
@@ -1644,9 +1644,7 @@ FILE *try_fsbdec(FILE *fd) {
" type ? for viewing the hex dump of the first %d bytes of the file because\n"
" it's possible to see part of the plain-text password in the encrypted file!\n"
" ", HEXSIZE);
- fflush(stdin);
- // TODO: test return value
- fgets(key, sizeof(key), stdin);
+ if (!fgets(key, sizeof(key), stdin)) exit(1);
delimit(key);
if(strcmp(key, "?")) break;
|