Don't need BUF_ and its NULL arg handling here.

Index: x509/x509_trs.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/x509/x509_trs.c,v
retrieving revision 1.16
diff -u -p -r1.16 x509_trs.c
--- x509/x509_trs.c     28 Sep 2014 10:52:59 -0000      1.16
+++ x509/x509_trs.c     31 Oct 2014 04:13:14 -0000
@@ -57,6 +57,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 #include <openssl/err.h>
 #include <openssl/x509v3.h>
@@ -202,7 +203,7 @@ X509_TRUST_add(int id, int flags, int (*
        if (trtmp->flags & X509_TRUST_DYNAMIC_NAME)
                free(trtmp->name);
        /* dup supplied name */
-       if ((trtmp->name = BUF_strdup(name)) == NULL)
+       if ((trtmp->name = strdup(name)) == NULL)
                goto err;
        /* Keep the dynamic flag of existing entry */
        trtmp->flags &= X509_TRUST_DYNAMIC;
Index: x509v3/v3_addr.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/x509v3/v3_addr.c,v
retrieving revision 1.13
diff -u -p -r1.13 v3_addr.c
--- x509v3/v3_addr.c    13 Jul 2014 16:03:10 -0000      1.13
+++ x509v3/v3_addr.c    31 Oct 2014 04:12:45 -0000
@@ -1019,7 +1019,7 @@ v2i_IPAddrBlocks(const struct v3_ext_met
                length = length_from_afi(afi);
 
                /*
-                * Handle SAFI, if any, and BUF_strdup() so we can 
null-terminate
+                * Handle SAFI, if any, and strdup() so we can null-terminate
                 * the other input values.
                 */
                if (safi != NULL) {
Index: store/str_lib.c
===================================================================
RCS file: /cvs/src/lib/libssl/src/crypto/store/str_lib.c,v
retrieving revision 1.10
diff -u -p -r1.10 str_lib.c
--- store/str_lib.c     10 Jul 2014 22:45:58 -0000      1.10
+++ store/str_lib.c     31 Oct 2014 04:12:30 -0000
@@ -1341,7 +1341,7 @@ STORE_ATTR_INFO_set_cstr(STORE_ATTR_INFO
                return 0;
        }
        if (!ATTR_IS_SET(attrs, code)) {
-               if ((attrs->values[code].cstring = BUF_strndup(cstr, 
cstr_size)))
+               if ((attrs->values[code].cstring = strndup(cstr, cstr_size)))
                        return 1;
                STOREerr(STORE_F_STORE_ATTR_INFO_SET_CSTR,
                    ERR_R_MALLOC_FAILURE);

Reply via email to