From 39fd8a543e6f18ed3accea6db537f4a36fdb017d Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 28 Jul 2023 10:17:21 +0000 Subject: Remove BUF_[a-z]* API This are a bunch of strange string handlers with NULL checks that make no real sense except to some devs who like to sprinkle them everywhere. Fortunately, nothing uses these anymore, so they can go. ok jsing --- src/lib/libcrypto/buffer/buffer.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/lib/libcrypto/buffer/buffer.h') diff --git a/src/lib/libcrypto/buffer/buffer.h b/src/lib/libcrypto/buffer/buffer.h index c210bfd1c5..d461d6493c 100644 --- a/src/lib/libcrypto/buffer/buffer.h +++ b/src/lib/libcrypto/buffer/buffer.h @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.h,v 1.16 2022/07/12 14:42:48 kn Exp $ */ +/* $OpenBSD: buffer.h,v 1.17 2023/07/28 10:17:21 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -58,9 +58,6 @@ #ifndef HEADER_BUFFER_H #define HEADER_BUFFER_H -#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) -#define __bounded__(x, y, z) -#endif #include @@ -85,19 +82,6 @@ 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); -void * BUF_memdup(const void *data, size_t siz); -void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); - -/* 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 - void ERR_load_BUF_strings(void); /* Error codes for the BUF functions. */ -- cgit v1.2.3-55-g6feb