diff options
author | 2014-10-16 03:19:02 +0000 | |
---|---|---|
committer | 2014-10-16 03:19:02 +0000 | |
commit | 34b64b5c5f840a0833b4f7f456b67d326d45eda4 (patch) | |
tree | 41855d279b6c6cf41094db11fa97c89519607059 /lib/libcrypto/buffer/buffer.h | |
parent | Use reallocarray() to get integer overflow detection. (diff) | |
download | wireguard-openbsd-34b64b5c5f840a0833b4f7f456b67d326d45eda4.tar.xz wireguard-openbsd-34b64b5c5f840a0833b4f7f456b67d326d45eda4.zip |
Get rid of the last remaining BUF_strdup and BUF_strlcpy and friends, use
intrinsic functions everywhere, and wrap these functions in an
#ifndef LIBRESSL_INTERNAL to make sure we don't bring their use back.
Diffstat (limited to 'lib/libcrypto/buffer/buffer.h')
-rw-r--r-- | lib/libcrypto/buffer/buffer.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libcrypto/buffer/buffer.h b/lib/libcrypto/buffer/buffer.h index def1943d319..5aa0e3ea474 100644 --- a/lib/libcrypto/buffer/buffer.h +++ b/lib/libcrypto/buffer/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.13 2014/07/13 14:13:27 beck Exp $ */ +/* $OpenBSD: buffer.h,v 1.14 2014/10/16 03:19:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -84,17 +84,20 @@ BUF_MEM *BUF_MEM_new(void); void BUF_MEM_free(BUF_MEM *a); int BUF_MEM_grow(BUF_MEM *str, size_t len); int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); +#ifndef LIBRESSL_INTERNAL char * BUF_strdup(const char *str); char * BUF_strndup(const char *str, size_t siz); +#endif void * BUF_memdup(const void *data, size_t siz); void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); +#ifndef LIBRESSL_INTERNAL /* safe string functions */ size_t BUF_strlcpy(char *dst, const char *src, size_t siz) __attribute__ ((__bounded__(__string__,1,3))); size_t BUF_strlcat(char *dst, const char *src, size_t siz) __attribute__ ((__bounded__(__string__,1,3))); - +#endif /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes |