programs: cert_write: fixed bug in parsing dec serial
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
This commit is contained in:
parent
856cec45eb
commit
48fdbb3940
1 changed files with 1 additions and 1 deletions
|
@ -277,7 +277,7 @@ int parse_serial_decimal_format(unsigned char *obuf, size_t obufmax,
|
|||
val = (dec >> ((remaining_bytes - 1) * 8)) & 0xFF;
|
||||
|
||||
/* Skip leading zeros */
|
||||
if ((val) != 0) {
|
||||
if ((val != 0) || (*len != 0)) {
|
||||
*p = val;
|
||||
(*len)++;
|
||||
p++;
|
||||
|
|
Loading…
Reference in a new issue