r22493 by jghali - #15279: Warning: Array index used before limits check
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 29 01:07:20 UTC 2018
Author: jghali
Date: Sun Apr 29 01:07:20 2018
New Revision: 22493
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22493
Log:
#15279: Warning: Array index used before limits check
Modified:
branches/Version14x/Scribus/scribus/plugins/tools/2geomtools/lib2geom/piecewise.h
Modified: branches/Version14x/Scribus/scribus/plugins/tools/2geomtools/lib2geom/piecewise.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22493&path=/branches/Version14x/Scribus/scribus/plugins/tools/2geomtools/lib2geom/piecewise.h
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/tools/2geomtools/lib2geom/piecewise.h (original)
+++ branches/Version14x/Scribus/scribus/plugins/tools/2geomtools/lib2geom/piecewise.h Sun Apr 29 01:07:20 2018
@@ -291,7 +291,7 @@
unsigned si = 0, ci = 0; //Segment index, Cut index
//if the cuts have something earlier than the Piecewise<T>, add portions of the first segment
- while(c[ci] < pw.cuts.front() && ci < c.size()) {
+ while(ci < c.size() && c[ci] < pw.cuts.front()) {
bool isLast = (ci == c.size()-1 || c[ci + 1] >= pw.cuts.front());
ret.push_cut(c[ci]);
ret.push_seg( elem_portion(pw, 0, c[ci], isLast ? pw.cuts.front() : c[ci + 1]) );
More information about the scribus-commit
mailing list