Skip to content

Commit

Permalink
Ensure that SIZE_MAX is defined where OSSL_SSIZE_MAX is used.
Browse files Browse the repository at this point in the history
include/openssl/e_os2.h defines OSSL_SSIZE_MAX in terms of SIZE_MAX as a
fallback.  This doesn't work well on platforms where SIZE_MAX isn't defined,
so we must ensure that it's defined by including "internal/numbers.h".
Since this is compensating for operating system discrepancies, it's
reasonable to make this change in include/internal/e_os.h.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #19693)

(cherry picked from commit 1a298b0)
  • Loading branch information
levitte committed Nov 16, 2022
1 parent 46b13bb commit 8fe8c0f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/internal/e_os.h
Expand Up @@ -16,6 +16,7 @@
# include <openssl/e_os2.h>
# include <openssl/crypto.h>
# include "internal/nelem.h"
# include "internal/numbers.h" /* Ensure the definition of SIZE_MAX */

/*
* <openssl/e_os2.h> contains what we can justify to make visible to the
Expand Down

0 comments on commit 8fe8c0f

Please sign in to comment.