curl-curl/lib/curlx
Daniel Stenberg 5e2d4d7905
base64: accept zero length argument to base64_encode
We used to treat 0 as "call strlen() to get the length" for
curlx_base64_encode, but it turns out this is rather fragile as we
easily do the mistake of passing in zero when the data is actually not
there and then calling strlen() is wrong.

Force the caller to pass in the correct size. A zero length input string
now returns a zero length output and a NULL pointer.

Closes #18617
2025-09-19 22:57:20 +02:00
..
.checksrc checksrc: reduce exceptions, apply again to curlx 2025-06-27 17:33:35 +02:00
base64.c base64: accept zero length argument to base64_encode 2025-09-19 22:57:20 +02:00
base64.h mime: reuse the base64 string from the base64 code 2025-05-10 23:01:14 +02:00
binmode.h lib: make CURLX_SET_BINMODE() and use it 2025-06-19 15:57:37 +02:00
curlx.h lib: make CURLX_SET_BINMODE() and use it 2025-06-19 15:57:37 +02:00
dynbuf.c dynbuf: assert on curlx_dyn_addf use with just "%s" 2025-08-06 08:32:07 +02:00
dynbuf.h curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
inet_ntop.c GHA/checksrc: expand spellcheck, fix issues found 2025-07-21 16:09:01 +02:00
inet_ntop.h inet_pton, inet_ntop: drop declarations when unused 2025-07-28 01:51:55 +02:00
inet_pton.c curlx: move curlx_inet_pton 2025-05-09 13:45:24 +02:00
inet_pton.h inet_pton, inet_ntop: drop declarations when unused 2025-07-28 01:51:55 +02:00
multibyte.c lib: move multibyte.[ch] to curlx/ 2025-05-08 10:19:19 +02:00
multibyte.h tidy-up: more whitespace/indent, comments 2025-07-25 11:47:51 +02:00
nonblock.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
nonblock.h curlx: move nonblock.[ch] into curlx/ 2025-05-08 13:22:02 +02:00
strparse.c curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
strparse.h tidy-up: whitespace 2025-07-11 13:32:54 +02:00
timediff.c curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
timediff.h curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
timeval.c tidy-up: move literal to the right side of comparisons 2025-07-27 22:35:17 +02:00
timeval.h curlx: move into to curlx/ 2025-05-07 11:01:15 +02:00
version_win32.c curlx: move version_win32.[ch] to curlx/ 2025-05-08 17:09:32 +02:00
version_win32.h curlx: move version_win32.[ch] to curlx/ 2025-05-08 17:09:32 +02:00
wait.c tidy-up: prefer ifdef/ifndef for single checks 2025-07-27 22:35:17 +02:00
wait.h lib: make curlx_wait_ms() and use it 2025-06-19 15:57:37 +02:00
warnless.c curl_setup: use SIZE_MAX instead of SIZE_T_MAX 2025-08-29 09:45:06 +02:00
warnless.h warnless: drop parts of the read/write preprocessor hack (Windows) 2025-06-19 17:09:43 +02:00
winapi.c windows: fix to preserve error code in curlx_winapi_strerror() 2025-05-09 15:56:07 +02:00
winapi.h curlx: add curlx_winapi_ functions 2025-05-09 10:45:36 +02:00