diff options
author | David Tardon <dtardon@redhat.com> | 2011-04-26 12:23:43 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-04-26 12:23:43 +0200 |
commit | d4188de23f9e6cb9405a07ea8bd0ce3ad326e99f (patch) | |
tree | b31fa3ff48b48b19af4f8513e05e2443adc4144a /lotuswordpro/source/filter/bencont.cxx | |
parent | 3900e9e03d14bb6d55056dae0fb1dcdcea8b3479 (diff) |
return early if no stream has been found
Diffstat (limited to 'lotuswordpro/source/filter/bencont.cxx')
-rw-r--r-- | lotuswordpro/source/filter/bencont.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index 27b274867162..485677636520 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -510,6 +510,13 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p } OSL_ENSURE(nLen > 0, "expected a non-0 length"); + // the 'D' stream is NULL or it has invalid length + if (nLen <= 0) + { + pStream = NULL; + return BenErr_NamedObjectError; + } + char * pBuf = new char[nLen]; assert(pBuf != NULL); char * pPointer = pBuf; |