mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
ID:447 - Fix access beyond array limits in serial_terminal
This commit is contained in:
parent
d56220f81f
commit
a203644728
@ -373,8 +373,9 @@ recv_response(struct ipmi_intf * intf, unsigned char *data, int len)
|
|||||||
}
|
}
|
||||||
p += rv;
|
p += rv;
|
||||||
resp_len += rv;
|
resp_len += rv;
|
||||||
if (*(p - 2) == ']' && (*(p - 1) == '\n' || *(p - 1) == '\r')) {
|
if (resp_len >= 2 && *(p - 2) == ']'
|
||||||
*p = 0;
|
&& (*(p - 1) == '\n' || *(p - 1) == '\r')) {
|
||||||
|
*(p - 1) = 0; /* overwrite EOL */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user