include/openssl/e_os2.h: define last-resort SSIZE_MAX.
authorAndy Polyakov <appro@openssl.org>
Thu, 19 Jul 2018 13:16:38 +0000 (15:16 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 20 Jul 2018 11:40:23 +0000 (13:40 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/6745)

include/openssl/e_os2.h

index be0ee200ca30640ecd206c74e82a804621219bc6..eeae2154452918c7a04a2be95d79163c2d15ab00 100644 (file)
@@ -216,6 +216,8 @@ extern "C" {
 #   define OSSL_SSIZE_MAX SSIZE_MAX
 #  elif defined(_POSIX_SSIZE_MAX)
 #   define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
+#  else
+#   define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX>>1))
 #  endif
 # endif