os400: asn1_new_from_bytes(): use data from a single element only

This commit is contained in:
Patrick Monnerat 2015-12-09 13:40:23 +01:00 committed by Daniel Stenberg
parent 002db176b7
commit e2985f0a67

View File

@ -303,7 +303,7 @@ asn1_new_from_bytes(const unsigned char *data, unsigned int length)
e = asn1_new(te.tag, te.end - te.beg);
if (e)
memcpy(e->header, data, length);
memcpy(e->header, data, e->end - e->header);
return e;
}