Skip to content
  • Bastien Nocera's avatar
    lib: Fix fpi_img_is_sane() · 94450a1d
    Bastien Nocera authored
    The checks weren't:
    - checking whether the width or height were negative
    - whether img->width * img->height would overflow, or
      was bigger than G_MAXINT
    - whether img->width * img->height was bigger than the total
      length of the buffer
    
    The last one looks like a thinko, it checked for:
    (img->length * img->height) < img->length
    which is equivalent to:
    img->height < 1
    which we already check for earlier.
    
    Closes: #85
    94450a1d