20857N/A 1 files changed, 9 insertions(+), 4 deletions(-)
20857N/A@@ -253,18 +253,23 @@ static asn1_retCode
20857N/A _asn1_objectid_der (unsigned char *str, unsigned char *der, int *der_len)
20857N/A int len_len, counter, k, first, max_len;
20857N/A+ char *temp = NULL, *n_end, *n_start;
20857N/A+ size_t temp_size = str ? strlen (str) : 0;
20857N/A- temp = (char *) _asn1_malloc (strlen (str) + 2);
20857N/A+ temp = (char *) _asn1_malloc (temp_size);
20857N/A+ strncpy (temp, str ? (const char *)str : "", temp_size);