diff --git a/gio/gio-tool-mount.c b/gio/gio-tool-mount.c index 7ab36c125..4d4a45092 100644 --- a/gio/gio-tool-mount.c +++ b/gio/gio-tool-mount.c @@ -112,7 +112,8 @@ prompt_for (const char *prompt, const char *default_value, gboolean echo) #endif - fgets(data, sizeof (data), stdin); + if (!fgets (data, sizeof (data), stdin)) + g_error ("Failed to read from standard input"); #ifdef HAVE_TERMIOS_H if (restore_flags)