commit 5c750e4f256b2d0f45cabb9176c91235ad7e0fa4 parent 0641e8ab944527636061fc4253408ec0de79607e Author: Ricardo Mones <ricardo@mones.org> Date: Thu, 4 Oct 2018 10:49:32 +0200 Disallow zero-length entity Diffstat:
| M | src/entity.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/entity.c b/src/entity.c @@ -325,7 +325,7 @@ static gchar* entity_extract_to_buffer(gchar *p, gchar b[]) b[i] = *p; ++i, ++p; } - if (*p != ';' || i == ENTITY_MAX_LEN) + if (*p != ';' || i == 0 || i == ENTITY_MAX_LEN) return NULL; b[i] = '\0';