mirror of
git://git.gnupg.org/gnupg.git
synced 2024-09-18 14:31:42 +02:00
Revert "common: Fix tlv-parser for constructed OCTET-STRING."
--
This reverts commit cc78b26a47
.
This commit is contained in:
parent
8b1f35a78f
commit
ea123af9b5
@ -556,10 +556,7 @@ tlv_expect_octet_string (tlv_parser_t tlv, int encapsulates,
|
|||||||
&& (!tlv->ti.is_constructed || encapsulates)))
|
&& (!tlv->ti.is_constructed || encapsulates)))
|
||||||
return (tlv->lasterr = gpg_error (GPG_ERR_INV_OBJ));
|
return (tlv->lasterr = gpg_error (GPG_ERR_INV_OBJ));
|
||||||
p = tlv->buffer;
|
p = tlv->buffer;
|
||||||
n = tlv->ti.length;
|
if (!(n=tlv->ti.length) && !tlv->ti.ndef)
|
||||||
if (!n && tlv->ti.ndef)
|
|
||||||
n = tlv->bufsize;
|
|
||||||
else if (!tlv->ti.length)
|
|
||||||
return (tlv->lasterr = gpg_error (GPG_ERR_TOO_SHORT));
|
return (tlv->lasterr = gpg_error (GPG_ERR_TOO_SHORT));
|
||||||
|
|
||||||
if (encapsulates && tlv->ti.is_constructed
|
if (encapsulates && tlv->ti.is_constructed
|
||||||
|
Loading…
Reference in New Issue
Block a user