mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
6-bit packed ascii size computation was not correctly handling strings that are not 3-byte aligned
This commit is contained in:
parent
a15d6a31ac
commit
6cb97e4327
@ -109,7 +109,7 @@ get_fru_area_str(uint8_t * data, uint32_t * offset)
|
||||
break;
|
||||
case 2: /* 10b: 6-bit ASCII */
|
||||
/* 4 chars per group of 1-3 bytes */
|
||||
size = ((((len+2)*4)/3) & ~3);
|
||||
size = (len * 8) / 6;
|
||||
break;
|
||||
case 3: /* 11b: 8-bit ASCII */
|
||||
case 1: /* 01b: BCD plus */
|
||||
|
Loading…
x
Reference in New Issue
Block a user