libtasn1-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU libtasn1 branch, master, updated. libtasn1_2_9-9-g58cda71


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU libtasn1 branch, master, updated. libtasn1_2_9-9-g58cda71
Date: Tue, 30 Aug 2011 15:07:28 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU libtasn1".

http://git.savannah.gnu.org/cgit/libtasn1.git/commit/?id=58cda71590f48db415e0005f2513da53944063d1

The branch, master has been updated
       via  58cda71590f48db415e0005f2513da53944063d1 (commit)
      from  22467f04196c52ebfdf14255748de1b977bff865 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 58cda71590f48db415e0005f2513da53944063d1
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Aug 30 17:07:21 2011 +0200

    small optimization

-----------------------------------------------------------------------

Summary of changes:
 lib/coding.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/coding.c b/lib/coding.c
index 111e063..3cc0ef8 100644
--- a/lib/coding.c
+++ b/lib/coding.c
@@ -256,15 +256,17 @@ _asn1_objectid_der (unsigned char *str, unsigned char 
*der, int *der_len)
   char *temp, *n_end, *n_start;
   unsigned char bit7;
   unsigned long val, val1 = 0;
+  int str_len = strlen(str);
 
   max_len = *der_len;
 
-  temp = (char *) _asn1_malloc (strlen (str) + 2);
+  temp = _asn1_malloc (str_len + 2);
   if (temp == NULL)
     return ASN1_MEM_ALLOC_ERROR;
 
-  strcpy (temp, str);
-  strcat (temp, ".");
+  memcpy (temp, str, str_len);
+  temp[str_len] = '.';
+  temp[str_len+1] = 0;
 
   counter = 0;
   n_start = temp;


hooks/post-receive
-- 
GNU libtasn1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]