summaryrefslogtreecommitdiff
path: root/unoidl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-11-18 16:23:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-11-18 16:24:06 +0100
commitf542ad9f3022dae7439856dadb0130d66f51929a (patch)
tree7250d2d1eee1e4eaa85c610ee52ec09c03708379 /unoidl
parent55cc5a146d72b4f20d654d87d246caffbd783c20 (diff)
Check that UNOIDL enum has members
Change-Id: I5b362ad374dad5fd4a79b8a7706defb749e25eb3
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");