Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19240)
(cherry picked from commit
c6be0aa8ac3c172ad998ce33f392143312bfe760)
#include <stdio.h>
#include <errno.h>
#include <openssl/crypto.h>
+#include "internal/numbers.h"
#include "bio_local.h"
/*
if (ret < 0)
ret = 0;
+#if LONG_MAX > SIZE_MAX
+ if (ret > SIZE_MAX)
+ ret = SIZE_MAX;
+#endif
return (size_t)ret;
}
if (ret < 0)
ret = 0;
+#if LONG_MAX > SIZE_MAX
+ if (ret > SIZE_MAX)
+ ret = SIZE_MAX;
+#endif
return (size_t)ret;
}