diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 854a4e0d865c..62245f6f38be 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -62,6 +62,8 @@ sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSiz len = maxSize / 2; } + assert(len > 0 && "maxSize has to be >= 2"); + for (i = 0; i < len; i++) { sal_uInt16 aChar;