diff options
Diffstat (limited to 'payloads/libpayload/libc/readline.c')
-rw-r--r-- | payloads/libpayload/libc/readline.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/payloads/libpayload/libc/readline.c b/payloads/libpayload/libc/readline.c index 01a565a698..9387e09149 100644 --- a/payloads/libpayload/libc/readline.c +++ b/payloads/libpayload/libc/readline.c @@ -55,6 +55,8 @@ char *readline(const char *prompt) if (!readline_buffer || !readline_bufferlen) { #define READLINE_BUFFERSIZE 256 readline_buffer = malloc(READLINE_BUFFERSIZE); + if (!readline_buffer) + return NULL; readline_bufferlen = READLINE_BUFFERSIZE; memset(readline_buffer, 0, readline_bufferlen); } |