Skip to content

Commit

Permalink
Fix potential crash when no target name is present
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Sorce <simo@redhat.com>
  • Loading branch information
simo5 committed Mar 17, 2023
1 parent 646c7fc commit a060d02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ntlm.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ static int ntlm_decode_u16l_str_hdr(struct ntlm_ctx *ctx,
safefree(out);
} else {
/* make sure to terminate output string */
out[outlen] = '\0';
if (out) {
out[outlen] = '\0';
}
}

*str = out;
Expand Down

0 comments on commit a060d02

Please sign in to comment.