Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic Error on Exif Data for Software #457

Open
lk33 opened this issue Nov 14, 2023 · 0 comments
Open

Panic Error on Exif Data for Software #457

lk33 opened this issue Nov 14, 2023 · 0 comments

Comments

@lk33
Copy link

lk33 commented Nov 14, 2023

  • When trying to retrieve size of an image,
    size,_ := bimg.NewImage(img).Size()
  • In github.com/h2non/bimg/metadata.go,
    Metadata function tries to extract Software tag from image. Wherein an image had Software value starting with '('. This is not being handled at github.com/h2non/bimg/vips.go -> vipsExifStringTag -> vipsExifShort,
    Leads to panic with slice out of bound stack trace.
  • Infact, this vipsExifShort is being used to extract lot of Exif data in Metadata function.

Kindly handle images with such metadata. In case there is a hard restriction, please serve an error to handle gracefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant