mirror of https://github.com/GNOME/gimp.git
Check if the array index is legal before using it, not the other way
2004-07-18 Philip Lafleur <plafleur@cvs.gnome.org> * app/paint/gimpink-blob.c (blob_make_convex): Check if the array index is legal before using it, not the other way around. Fixes bug #144856.
This commit is contained in:
parent
68aa11c012
commit
a1c89069db
|
@ -1,3 +1,9 @@
|
|||
2004-07-18 Philip Lafleur <plafleur@cvs.gnome.org>
|
||||
|
||||
* app/paint/gimpink-blob.c (blob_make_convex): Check if the
|
||||
array index is legal before using it, not the other way around.
|
||||
Fixes bug #144856.
|
||||
|
||||
2004-07-17 Philip Lafleur <plafleur@cvs.gnome.org>
|
||||
|
||||
* plug-ins/common/polar.c (dialog_update_preview): Fixed a
|
||||
|
|
|
@ -678,7 +678,7 @@ blob_make_convex (Blob *b,
|
|||
{
|
||||
present[i2] &= ~EDGE_LEFT;
|
||||
i2 = i1;
|
||||
while (! (present[--i1] & EDGE_LEFT) && i1 >= start);
|
||||
while ((--i1) >= start && (! (present[i1] & EDGE_LEFT)));
|
||||
|
||||
if (i1 < start)
|
||||
{
|
||||
|
@ -719,8 +719,7 @@ blob_make_convex (Blob *b,
|
|||
{
|
||||
present[i2] &= ~EDGE_RIGHT;
|
||||
i2 = i1;
|
||||
while (! (present[--i1] & EDGE_RIGHT) && i1 >= start)
|
||||
;
|
||||
while ((--i1) >= start && (! (present[i1] & EDGE_RIGHT)));
|
||||
|
||||
if (i1 < start)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue