asn1: Fix braino in asn1_print
This commit is contained in:
@@ -434,7 +434,7 @@ dotype(unsigned char *buf, size_t len, char **argv, size_t *size)
|
||||
|
||||
if (wants != sz)
|
||||
errx(1, "Encoding will not round trip");
|
||||
ret = sorted_types[i].encode(der, sz, v, &sz);
|
||||
ret = sorted_types[i].encode(der + (sz - 1), sz, v, &sz);
|
||||
if (ret != 0)
|
||||
errx(1, "Encoding failed");
|
||||
if (memcmp(buf, der, sz))
|
||||
@@ -452,7 +452,7 @@ dotype(unsigned char *buf, size_t len, char **argv, size_t *size)
|
||||
|
||||
if (wants != sz)
|
||||
errx(1, "Encoding of copy will not round trip");
|
||||
ret = sorted_types[i].encode(der, sz, vcpy, &sz);
|
||||
ret = sorted_types[i].encode(der + (sz - 1), sz, vcpy, &sz);
|
||||
if (ret != 0)
|
||||
errx(1, "Encoding of copy failed");
|
||||
if (memcmp(buf, der, sz))
|
||||
|
Reference in New Issue
Block a user