coverity#1219652 untrusted loop bound
coverity#1219652 untrusted loop bound

Change-Id: Ic76fe5b502c9c2ca12e2d0905c3d680a591c2052

LibreOffice/libcdr,LibreOffice/libcdr,LibreOffice/libcdr,LibreOffice/libcdr