Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libnvme/src/nvme/fabrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,9 @@ static int nvme_discovery_log(libnvme_ctrl_t ctrl,
static void sanitize_discovery_log_entry(struct libnvme_global_ctx *ctx,
struct nvmf_disc_log_entry *e)
{
if (!e)
return;
Copy link
Copy Markdown
Collaborator

@igaw igaw May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you observe a crash? I don't see how this is potential possible. All call side pass in &log->entries[i]. So this will be always a pointer value which is != NULL.

I don't mind starting to sanity check the log page input (all input is evil) but this seems at the wrong place.


strchomp(e->trsvcid, sizeof(e->trsvcid));
strchomp(e->traddr, sizeof(e->traddr));

Expand Down
Loading