diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-08 00:26:31 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-03-08 00:26:31 +0100 |
| commit | ee75d8e3e559e4424113c9c1fbc2275a545fc887 (patch) | |
| tree | 673296900fb5faf77b95d7f11cf6baa0cc68fec2 | |
| parent | 0954abcf098efbf2c73373a49c7fe26a5effcfcb (diff) | |
| download | slcl-ee75d8e3e559e4424113c9c1fbc2275a545fc887.tar.gz | |
html.c: Allow empty strings on html_encode
| -rw-r--r-- | html.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -24,6 +24,12 @@ static char *html_encode(const char *s) dynstr_init(&d); + if (!*s && dynstr_append(&d, "")) + { + fprintf(stderr, "%s: dynstr_append empty failed\n", __func__); + goto failure; + } + while (*s) { static const struct esc |
