mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 23:10:18 +01:00
nm_utils_buf_utf8safe_unescape() is almost the same as g_strcompress(), with the only difference is that if the string contains NUL escapes "\000", it will be handled correctly. In other words, g_strcompress() and nm_utils_str_utf8safe_unescape() can only unescape values, that contain no NUL escapes. That's why we added our own binary unescape function. As we already have our g_strcompress() variant, use it. It just gives it more testing and usage. Also, we have full control over it's behavior. For example, g_strcompress() issues a g_warning() when encountering a trailing '\\'. I think this makes it unsuitable to unescape untrusted data. Either the function should fail, or just make the best of it. Currently, our implementation does the latter. |
||
|---|---|---|
| .. | ||
| c-list | ||
| c-rbtree | ||
| c-siphash | ||
| c-stdaux | ||
| n-acd | ||
| n-dhcp4 | ||
| nm-glib-aux | ||
| nm-keyfile | ||
| nm-libnm-aux | ||
| nm-libnm-core-aux | ||
| nm-libnm-core-intern | ||
| nm-std-aux | ||
| nm-udev-aux | ||
| nm-utils | ||
| systemd | ||
| meson.build | ||
| nm-default.h | ||
| nm-meta-setting.c | ||
| nm-meta-setting.h | ||
| nm-test-libnm-utils.h | ||
| nm-test-utils-impl.c | ||
| nm-version-macros.h.in | ||