diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/a_object.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/asn1/a_object.c b/src/lib/libcrypto/asn1/a_object.c index da68905939..d524509374 100644 --- a/src/lib/libcrypto/asn1/a_object.c +++ b/src/lib/libcrypto/asn1/a_object.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_object.c,v 1.18 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: a_object.c,v 1.19 2014/07/10 11:25:13 tedu Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -311,14 +311,14 @@ c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, long len) | |||
311 | if ((data == NULL) || (ret->length < len)) { | 311 | if ((data == NULL) || (ret->length < len)) { |
312 | ret->length = 0; | 312 | ret->length = 0; |
313 | free(data); | 313 | free(data); |
314 | data = malloc(len ? (int)len : 1); | 314 | data = malloc(len ? len : 1); |
315 | if (data == NULL) { | 315 | if (data == NULL) { |
316 | i = ERR_R_MALLOC_FAILURE; | 316 | i = ERR_R_MALLOC_FAILURE; |
317 | goto err; | 317 | goto err; |
318 | } | 318 | } |
319 | ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA; | 319 | ret->flags |= ASN1_OBJECT_FLAG_DYNAMIC_DATA; |
320 | } | 320 | } |
321 | memcpy(data, p, (int)len); | 321 | memcpy(data, p, len); |
322 | /* reattach data to object, after which it remains const */ | 322 | /* reattach data to object, after which it remains const */ |
323 | ret->data = data; | 323 | ret->data = data; |
324 | ret->length = (int)len; | 324 | ret->length = (int)len; |