When we try to export a grayscale image with layers with negative offsets to a GIH brush GIMP crashes without producing any crashlog. Running in GDB showed us that there is heap corruption caused by incorrect computation of buffer sizes because of the negative offsets. In file_gih_image_to_pipe there is a comment that offsets are assumed positive, but no checking is done whether that is correct. Let's add some checks, set offset to 0 if negative and adjust width and height accordingly. |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| file-data-gbr.c | ||
| file-data-gbr.h | ||
| file-data-gex.c | ||
| file-data-gex.h | ||
| file-data-gih.c | ||
| file-data-gih.h | ||
| file-data-pat.c | ||
| file-data-pat.h | ||
| file-data.c | ||
| file-data.h | ||
| Makefile.am | ||
| meson.build | ||