about summary refs log tree commit diff stats
path: root/src/command/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.c')
-rw-r--r--src/command/commands.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/command/commands.c b/src/command/commands.c
index b1a829b5..d6a8af2f 100644
--- a/src/command/commands.c
+++ b/src/command/commands.c
@@ -137,6 +137,10 @@ cmd_connect(gchar **args, struct cmd_help_t help)
                 if(stream){
                     // Limit to READ_BUF_SIZE bytes to prevent overflows in the case of a poorly chosen command
                     account->password = g_malloc(READ_BUF_SIZE);
+                    if(!account->password){
+                        log_error("Failed to allocate enough memory to read eval_password output");
+                        return TRUE;
+                    }
                     account->password = fgets(account->password, READ_BUF_SIZE, stream);
                     pclose(stream);
                 } else {