Headline
CVE-2022-1507: libnsgif: Fix null pointer deref on frameless GIF input · hpjansson/chafa@e4b777c
chafa: NULL Pointer Dereference in function gif_internal_decode_frame at libnsgif.c:599 allows attackers to cause a denial of service (crash) via a crafted input file. in GitHub repository hpjansson/chafa prior to 1.10.2. chafa: NULL Pointer Dereference in function gif_internal_decode_frame at libnsgif.c:599 allows attackers to cause a denial of service (crash) via a crafted input file.
@@ -595,6 +595,12 @@ gif_internal_decode_frame(gif_animation *gif,
unsigned int x, y, decode_y, burst_bytes;
register unsigned char colour;
/* If the GIF has no frame data, frame holders will not be allocated in
* gif_initialise() */
if (gif->frames == NULL) {
return GIF_INSUFFICIENT_DATA;
}
/* Ensure this frame is supposed to be decoded */
if (gif->frames[frame].display == false) {
return GIF_OK;
Related news
chafa: NULL Pointer Dereference in function gif_internal_decode_frame at libnsgif.c:599 allows attackers to cause a denial of service (crash) via a crafted input file. in GitHub repository hpjansson/chafa prior to 1.10.2. chafa: NULL Pointer Dereference in function gif_internal_decode_frame at libnsgif.c:599 allows attackers to cause a denial of service (crash) via a crafted input file.