From 65010fa90cde4d3844c77cb00c51b2485f66de52 Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 1 Jun 2024 17:56:44 +0000 Subject: [PATCH] Neuter the bounded attribute as was done elsewhere for portable --- lib/libcrypto/chacha/chacha-merged.c | 6 +++++- lib/libcrypto/md4/md4.h | 6 +++++- lib/libcrypto/ripemd/ripemd.h | 6 +++++- lib/libcrypto/whrlpool/whrlpool.h | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/libcrypto/chacha/chacha-merged.c b/lib/libcrypto/chacha/chacha-merged.c index b405af84ee73..3e17b9354b3c 100644 --- a/lib/libcrypto/chacha/chacha-merged.c +++ b/lib/libcrypto/chacha/chacha-merged.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chacha-merged.c,v 1.11 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: chacha-merged.c,v 1.12 2024/06/01 17:56:44 tb Exp $ */ /* chacha-merged.c version 20080118 D. J. Bernstein @@ -7,6 +7,10 @@ Public domain. #include +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif + #define CHACHA_MINKEYLEN 16 #define CHACHA_NONCELEN 8 #define CHACHA_CTRLEN 8 diff --git a/lib/libcrypto/md4/md4.h b/lib/libcrypto/md4/md4.h index 64bcfefeec19..f0a9daeb5074 100644 --- a/lib/libcrypto/md4/md4.h +++ b/lib/libcrypto/md4/md4.h @@ -1,4 +1,4 @@ -/* $OpenBSD: md4.h,v 1.19 2024/06/01 07:44:11 tb Exp $ */ +/* $OpenBSD: md4.h,v 1.20 2024/06/01 17:56:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,6 +61,10 @@ #ifndef HEADER_MD4_H #define HEADER_MD4_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif + #include #ifdef __cplusplus diff --git a/lib/libcrypto/ripemd/ripemd.h b/lib/libcrypto/ripemd/ripemd.h index 98fd0f71ec6d..3dc6bd8b25a6 100644 --- a/lib/libcrypto/ripemd/ripemd.h +++ b/lib/libcrypto/ripemd/ripemd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripemd.h,v 1.17 2024/06/01 07:44:11 tb Exp $ */ +/* $OpenBSD: ripemd.h,v 1.18 2024/06/01 17:56:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -61,6 +61,10 @@ #ifndef HEADER_RIPEMD_H #define HEADER_RIPEMD_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif + #include #ifdef __cplusplus diff --git a/lib/libcrypto/whrlpool/whrlpool.h b/lib/libcrypto/whrlpool/whrlpool.h index 1670a81b3785..d8e7eef14136 100644 --- a/lib/libcrypto/whrlpool/whrlpool.h +++ b/lib/libcrypto/whrlpool/whrlpool.h @@ -1,10 +1,14 @@ -/* $OpenBSD: whrlpool.h,v 1.7 2024/06/01 07:44:11 tb Exp $ */ +/* $OpenBSD: whrlpool.h,v 1.8 2024/06/01 17:56:44 tb Exp $ */ #include #ifndef HEADER_WHRLPOOL_H #define HEADER_WHRLPOOL_H +#if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) +#define __bounded__(x, y, z) +#endif + #include #ifdef __cplusplus