coverity#1219664 untrusted loop bound
coverity#1219664 untrusted loop bound

Change-Id: Icfa2357a80b2cd5e813c8192741e3b01dd70c313

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