diff --git a/lib/identify.c b/lib/identify.c index b6993f7..44fa48d 100644 --- a/lib/identify.c +++ b/lib/identify.c @@ -234,6 +234,13 @@ static void flood_fill_seed(struct quirc *q, quirc_pixel_t *row; 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; } @@ -268,6 +275,7 @@ static void flood_fill_seed(struct quirc *q, continue; } + /* We've done. */ break; } }