Skip to content

Commit

Permalink
fixup! asn1: avoid truncating OID in OpenSSL::ASN1::ObjectId#oid
Browse files Browse the repository at this point in the history
  • Loading branch information
rhenium committed Jul 21, 2017
1 parent 23887b7 commit 49c8746
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/openssl/ossl_asn1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ ossl_asn1obj_get_oid(VALUE self)
val = ossl_asn1_get_value(self);
a1obj = obj_to_asn1obj(val);
len = OBJ_obj2txt(buf, sizeof(buf), a1obj, 1);
if (len < 0) {
if (len <= 0) {
ASN1_OBJECT_free(a1obj);
ossl_raise(eASN1Error, "OBJ_obj2txt");
}
Expand Down

0 comments on commit 49c8746

Please sign in to comment.