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-07-20 23:52:52 +0200 |
| commit | cc714d9006553f852f41954e2e9f55e7ee57accd (patch) | |
| tree | 153c0a676ec2058eae614da84618e68d068e592e /html.c | |
| parent | 5b0faff8e6035d9dab6482e6cade78129e1f1e2d (diff) | |
html.c: Allow empty strings on html_encode
Diffstat (limited to 'html.c')
| -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 |
