coverity#1219666 untrusted loop bound
coverity#1219666 untrusted loop bound

Change-Id: Ic059fe02f4ca3443317e9aa445071bbaf5c6065c

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