Links (4)
“ Null pointer dereference (while (*src_bytes_left > 0) {)
https://android.googlesource.com/platform/bionic/+/master/libc/bionic/iconv.cpp#131 ”
“ i think this is working as intended from a specification perspective... i don't think there's any such special case for src_bytes_left, and that passing NULL there is undefined behavior (see https://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html ). ”
“ yeah, glibc and macOS both ignore src_bytes_left if src_bytes is NULL, so i'll assume that the value of consistency with other implementations outweighs the cost of inconsistency with ourselves: https://android-review.googlesource.com/c/platform/bionic/+/1595034 ”