diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2024-09-30 12:28:07 +0300 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2024-09-30 12:28:07 +0300 |
commit | 3fd6c59042dbba50391e30862beac979491145fe (patch) | |
tree | 63d729254efdf6446d4d4a05e7a8a0dd803eedec /lib/string_helpers.c | |
parent | 1d7ec62374bf049349c47f07f0b95a6524bb1b98 (diff) | |
parent | 9852d85ec9d492ebef56dc5f229416c925758edc (diff) | |
download | linux-3fd6c59042dbba50391e30862beac979491145fe.tar.xz |
Merge tag 'v6.12-rc1' into clk-meson-next
Linux 6.12-rc1
Diffstat (limited to 'lib/string_helpers.c')
-rw-r--r-- | lib/string_helpers.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/string_helpers.c b/lib/string_helpers.c index 69ba49b853c7..4f887aa62fa0 100644 --- a/lib/string_helpers.c +++ b/lib/string_helpers.c @@ -321,6 +321,9 @@ int string_unescape(char *src, char *dst, size_t size, unsigned int flags) { char *out = dst; + if (!size) + size = SIZE_MAX; + while (*src && --size) { if (src[0] == '\\' && src[1] != '\0' && size > 1) { src++; |