Disallow zero-length entity
[claws.git] / src / entity.c
index aa0c543454ebd66c4d3118e4a3b7625d9301b38c..fcf4c2801350845a08625a3193beab95601cd9d0 100644 (file)
@@ -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';