mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Stefan Ott patch for occasional sdr dump segfault #1793076
This commit is contained in:
parent
e807543023
commit
b7ae2149e9
@ -4001,6 +4001,12 @@ ipmi_sdr_dump_bin(struct ipmi_intf *intf, const char *ofile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* write sdr entry */
|
/* write sdr entry */
|
||||||
|
if (!sdrr->raw) {
|
||||||
|
lprintf(LOG_ERR, "Error: raw data is null (length=%d)",
|
||||||
|
sdrr->length);
|
||||||
|
rc = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
r = fwrite(sdrr->raw, 1, sdrr->length, fp);
|
r = fwrite(sdrr->raw, 1, sdrr->length, fp);
|
||||||
if (r != sdrr->length) {
|
if (r != sdrr->length) {
|
||||||
lprintf(LOG_ERR, "Error writing %d record bytes "
|
lprintf(LOG_ERR, "Error writing %d record bytes "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user