flood_fill_seed: Add comments on exit conditions

This commit is contained in:
YAMAMOTO Takashi 2021-05-11 15:03:09 +09:00
parent 22269c9a43
commit 6b3575cd59

View file

@ -234,6 +234,13 @@ static void flood_fill_seed(struct quirc *q,
quirc_pixel_t *row; quirc_pixel_t *row;
if (vars == last_vars) { if (vars == last_vars) {
/*
* "Stack overflow".
* Just stop and return.
* This can be caused by very complex shapes in
* the image, which is not likely a part of
* a valid QR code anyway.
*/
break; break;
} }
@ -268,6 +275,7 @@ static void flood_fill_seed(struct quirc *q,
continue; continue;
} }
/* We've done. */
break; break;
} }
} }