summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/00_syntax/09_string_literals
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-23 20:33:05 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-23 20:58:04 +0100
commit3f44c42055003797505c579881b1f8e01cc628d4 (patch)
tree3ccf97f0eaa5d2e73746e500f4fcaabe36b5619e /tests/custom/00_syntax/09_string_literals
parent01132db357544327e4934c2b1a5255cd8b2a7c1e (diff)
lib: rework format string handling
Instead of extracting and forwarding recognized conversion directives from the user supplied format string, properly parse the format string into its components and reassemble a canonical representation of the conversion directive internally before handing it to the libc's sprintf() implementation. Also take care of selecting the proper conversion specifiers for signed and unsigned 64bit integer values to fix broken `%d`, `%i`, `%u`, `%o`, `%x` and `%X` formats on 32bit systems. While reworking the format logic, also slightly improve `%s` argument handling by not duplicate the given value if it already is a string, which reduces the amount of required heap memory. Ref: https://bugs.openwrt.org/index.php?do=details&task_id=4234 Ref: https://git.openwrt.org/3d3d03479d5b4a976cf1320d29f4bd4937d5a4ba Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/00_syntax/09_string_literals')
0 files changed, 0 insertions, 0 deletions