Skip to content

Come across a corner case when decoding image cause core dump #158

@zwsjink

Description

@zwsjink

The error shows like this :

python3: /build/zbar-m079fX/zbar-0.10+doc/zbar/qrcode/qrdectxt.c:368: qr_code_data_list_extract_text: Assertion `next > syms->datalen' failed.
Aborted (core dumped)

when I'm doing experiment with a bunch of pictures, some case failed constantly:

corner_case

The code goes like this:

from PIL import Image
from pyzbar.pyzbar import decode
image = Image.open(image_path)
image = image.convert('L')
qr_codes = decode(image)
print(len(qr_codes))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions