aboutsummaryrefslogtreecommitdiffstats
path: root/epan/test_epan.c
AgeCommit message (Collapse)AuthorFilesLines
2022-10-26Rename ws_label_strcat() to ws_label_strcpy()João Valverde1-6/+6
The semantics of ws_label_strcat() are closer to g_strlcpy() so rename the function to reflect that.
2022-10-26epan: Rename a testJoão Valverde1-5/+8
2022-10-20epan/proto: Replace format text()João Valverde1-0/+102
The proto.h APIs expect valid UTF-8 so replace uses of format_text() with a label copy function that just does formatting and does not check for encoding errors. Avoid multiple levels of temporary string allocations. Make sure the copy does not truncate a multibyte character and produce invalid strings. Add debug checks for UTF-8 encoding errors instead. We escape C0 and C1 control codes (because control codes) and ASCII whitespace (and bell). Overall the goal is to be more efficient and optimized and help detect misuse of APIs by passing invalid UTF-8. Add a unit test for ws_label_strcat.