ID:365 - Fix for ipmitool crash when using serial-terminal interface

Negative value returned by serial_read_line() function was not properly
recognized, since the storage type was unsigned. This caused ipmitool crash in
some sutuations. This patch fixes the problem.

Commit for: Dmitry Bazhenov
This commit is contained in:
Zdenek Styblik 2015-07-25 12:49:07 +02:00
parent e8450850e3
commit a585af7e0c

View File

@ -358,7 +358,7 @@ recv_response(struct ipmi_intf * intf, unsigned char *data, int len)
{
char hex_rs[IPMI_SERIAL_MAX_RESPONSE * 3];
int i, j, resp_len = 0;
unsigned long rv;
long rv;
char *p, *pp;
char ch, str_hex[3];