Skip to content
  • Emmanuele Bassi's avatar
    jpeg: Limit the memory size when loading image data · b659038e
    Emmanuele Bassi authored
    Specially crafted JPEG images may lead to a crash when their size is too
    large; in the most benign of cases, the OS might terminate the process
    after it tries to allocate all the memory in the world.
    
    We can tell libjpeg to limit the size of the memory pool when loading,
    to avoid this kind of result. For the time being, 100 MB seems like a
    good threshold.
    
    Original patch by: Sam Ezeh <sam.z.ezeh@gmail.com>
    
    Fixes: #205
    b659038e