This series fixes two bugs in string_unescape() regarding the
destination buffer length. Both fixes are accompanied with kunit tests
which would fail without the fixes.

To make this possible, preparatory patches 1 and 2 improve and clean up
testing helpers and 3 introduces test_unescape_one() which allows for
targeted testing of the string_unescape() function.

Signed-off-by: Jonas Rebmann <[email protected]>
---
Jonas Rebmann (5):
      lib/tests: string_helpers: check null terminator too
      lib/tests: string_helpers: drop unused parameters
      lib/tests: string_helpers: introduce test_string_unescape_one
      lib/string_helpers: use full destination buffer in string_unescape()
      lib/string_helpers: fix counting of remaining bytes in string_unescape()

 lib/string_helpers.c             |  5 +++--
 lib/tests/string_helpers_kunit.c | 46 +++++++++++++++++++++++++++++-----------
 2 files changed, 37 insertions(+), 14 deletions(-)
---
base-commit: 587858367581b9c55c3690f4e63382ad622719d4
change-id: 20260915-string_unescape-c056aacc90cb

Best regards,
--  
Jonas Rebmann <[email protected]>


Reply via email to