Code Monkey home page Code Monkey logo

Comments (5)

vstinner avatar vstinner commented on August 16, 2024

Yeah, Hachoir has bugs, but it's basically no longer maintained: http://unmaintained.tech/

If you propose a fix, I can try to review it.

from hachoir.

nneonneo avatar nneonneo commented on August 16, 2024

from hachoir.

vstinner avatar vstinner commented on August 16, 2024

The problem is that Hachoir allows to create 2 fields at the same address:

 + 0) start_image: Start of image (SOI) (2 bytes)
 - 2) exif: EXIF (292 bytes)
      0) header= 0xff: Header (1 bytes)
      1) type= 0xe1: Type (1 bytes)
      2) size= 290: Size (2 bytes)
    - 4) content: Chunk content (288 bytes)
         0) header= "Exif\0\0": Header (Exif\0\0) (6 bytes)
         6) endian= "MM": Endian ('II' or 'MM') (2 bytes)
         8) version= 42: TIFF version number (2 bytes)
         10) img_dir_ofs= 8: Next image directory offset (4 bytes)
       + 14) ifd[0] (216 bytes)
       + 234) exif[0] (54 bytes)
       + 14) ifd[1] (216 bytes)
       + 234) exif[1] (54 bytes)
       + 14) ifd[2] (216 bytes)
       + 234) exif[2] (54 bytes)
       + 14) ifd[3] (216 bytes)
       ...

It should raise an error.

from hachoir.

nneonneo avatar nneonneo commented on August 16, 2024

from hachoir.

mengyyy avatar mengyyy commented on August 16, 2024

maybe the same problem LonamiWebs/Telethon#1385

from hachoir.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.