From 88424214227c50b210a1d8d1440e12c21deac95b Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 9 Oct 2019 13:11:22 +0200 Subject: [PATCH] coverity 71844 - fix untrusted value. fgets could have nulled the pointer. --- client/proxmark3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/proxmark3.c b/client/proxmark3.c index ced6ed5c5..31afe470f 100644 --- a/client/proxmark3.c +++ b/client/proxmark3.c @@ -160,6 +160,8 @@ check_script: if (!fgets(script_cmd_buf, sizeof(script_cmd_buf), current_cmdscriptfile())) { if (!pop_cmdscriptfile()) break; + if (script_cmd_buf == NULL) + break; goto check_script; } else {