Skip to content

Commit

Permalink
Fix null pointer deref issue osdp_reply_name
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Chandrasekaran <sidcha.dev@gmail.com>
  • Loading branch information
sidcha committed Sep 26, 2023
1 parent d33cd5a commit 24409e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdp_common.c
Expand Up @@ -120,7 +120,7 @@ const char *osdp_reply_name(int reply_id)
return "INVALID";
}
name = names[reply_id - REPLY_ACK];
if (name[0] == '\0') {
if (!name) {
return "UNKNOWN";
}
return name;
Expand Down

0 comments on commit 24409e9

Please sign in to comment.