mpv/misc
low-batt 6d208d38d2 charset_conv: fix memory corruption in mp_iconv_to_utf8
If mp_iconv_to_utf8 was given an empty string to convert in the buf
parameter it would corrupt memory when writing a null into outbuf
before returning it to the caller. This happened when streaming from a
URL that ends in a slash. For such a URL the method mp_basename returns
an empty string. The method append_dir_subtitles passes the result
returned from mp_basename to mp_iconv_to_utf8 which then corrupts
memory. This was detected using Guard Malloc. The fix changes
mp_iconv_to_utf8 check up front if buf is empty and if it is return
buf as the result in compliance with the documented behavior of the
method when no conversion is needed.

Fixes #11626
2023-04-29 01:37:41 +00:00
..
bstr.c
bstr.h
charset_conv.c charset_conv: fix memory corruption in mp_iconv_to_utf8 2023-04-29 01:37:41 +00:00
charset_conv.h
ctype.h
dispatch.c dispatch: add strange mechanism for making worker threads responsive 2020-03-05 22:00:50 +01:00
dispatch.h dispatch: add strange mechanism for making worker threads responsive 2020-03-05 22:00:50 +01:00
jni.c
jni.h
json.c misc/json: don't wrap top-level pretty strings/infs in quotes 2023-01-28 14:20:20 -06:00
json.h
linked_list.h
natural_sort.c
natural_sort.h
node.c misc/node: add bstr-based variants for map_get() and map_add() 2023-01-28 14:20:20 -06:00
node.h misc/node: add bstr-based variants for map_get() and map_add() 2023-01-28 14:20:20 -06:00
random.c misc/random: add xoshiro random number implementation 2022-08-17 10:21:55 -04:00
random.h various: fix various typos in the code base 2023-03-28 19:29:44 +00:00
rendezvous.c
rendezvous.h
thread_pool.c osdep: rename MP_UNREACHABLE 2021-11-03 15:15:20 +01:00
thread_pool.h
thread_tools.c
thread_tools.h