summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/libsmbclient/testacl3.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/libsmbclient/testacl3.c b/examples/libsmbclient/testacl3.c
index f34e273d6b7..59d9994ef39 100644
--- a/examples/libsmbclient/testacl3.c
+++ b/examples/libsmbclient/testacl3.c
@@ -27,7 +27,11 @@ int main(int argc, char * argv[])
{
fprintf(stdout, "Path: ");
*path = '\0';
- fgets(path, sizeof(path) - 1, stdin);
+ p = fgets(path, sizeof(path) - 1, stdin);
+ if (p == NULL) {
+ printf("Error reading from stdin\n");
+ return 1;
+ }
if (strlen(path) == 0)
{
return 0;