+ if (num_entities == 0 && (data_type == TYPE_ELEMENT_LIST ||
+ data_type == TYPE_CONTENT_LIST))
+ {
+ /* for element and content lists, zero entities are not allowed */
+ Error(ERR_WARN, "found empty list of entities for element %d",
+ element);
+
+ /* do not set "num_entities" here to prevent reading behind buffer */
+
+ *(int *)(conf[i].num_entities) = 1; /* at least one is required */
+ }
+ else
+ {
+ *(int *)(conf[i].num_entities) = num_entities;
+ }