summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
Diffstat (limited to 'unoidl')
-rw-r--r--unoidl/source/unoidlprovider.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/unoidl/source/unoidlprovider.cxx b/unoidl/source/unoidlprovider.cxx
index dc42fa122a37..deda03a08567 100644
--- a/unoidl/source/unoidlprovider.cxx
+++ b/unoidl/source/unoidlprovider.cxx
@@ -640,6 +640,10 @@ rtl::Reference< Entity > readEntity(
case 1: // enum type
{
sal_uInt32 n = file->read32(offset + 1);
+ if (n == 0) {
+ throw FileFormatException(
+ file->uri, "UNOIDL format: enum type with no members");
+ }
if (n > SAL_MAX_INT32) {
throw FileFormatException(
file->uri, "UNOIDL format: too many members of enum type");