Skip to content

Commit

Permalink
Prevent access to uninitialized device pointer (#680)
Browse files Browse the repository at this point in the history
  • Loading branch information
waltjohnson authored Jul 18, 2024
1 parent 85839e1 commit 53b31f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DeviceLogCSV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ bool cDeviceLogCSV::SaveData(p_data_hdr_t* dataHdr, const uint8_t* dataBuf, prot
{
return false;
}
else if (dataHdr->id == DID_DEV_INFO)
else if (dataHdr->id == DID_DEV_INFO && device)
{
memcpy((void *)&(device->devInfo), dataBuf, sizeof(dev_info_t));
}
Expand Down

0 comments on commit 53b31f6

Please sign in to comment.