Dear All,
`rsize_t` and `RSIZE_MAX` are defined as:
```
typedef size_t rsize_t;
#define RSIZE_MAX SIZE_MAX
```
But in general, `RSIZE_MAX` should be less than `SIZE_MAX`. It's typically defined as half `SIZE_MAX`. This document explains the reason:
https://en.cppreference.com/w/c/error . For example, `prebuilts/linux-x64/clang/lib64/clang/8.0.4/include/stdint.h` defines it as:
```
666:/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__
669:#define RSIZE_MAX (SIZE_MAX >> 1)
```
In fact, because `RSIZE_MAX` equals to `SIZE_MAX`, the range check in `mem???_s` functions become vacuously true. It's probably not what we want.