mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
fix display of binary encoded fru data
This commit is contained in:
parent
df7d0e6ee6
commit
990a9a4b6b
@ -103,6 +103,7 @@ get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
str = malloc(size+1);
|
||||
if (str == NULL)
|
||||
return NULL;
|
||||
memset(str, 0, size+1);
|
||||
|
||||
if (len == 0) {
|
||||
str[0] = '\0';
|
||||
@ -112,7 +113,7 @@ get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
|
||||
switch (typecode) {
|
||||
case 0: /* Binary */
|
||||
strncpy(str, buf2str(&data[off], len), len);
|
||||
strncpy(str, buf2str(&data[off], len), len*2);
|
||||
break;
|
||||
|
||||
case 1: /* BCD plus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user