Check for width==0 in restore_preview_image() to avoid floating point exception

DEVEL_2_0_BRANCH-1
Oliver Schwartz 2001-11-29 18:15:33 +00:00
rodzic 0bdd5a65e7
commit e6e433cea0
2 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2001-11-29 Oliver Schwartz <Oliver.Schwartz@gmx.de>
* preview.c: in function restore_preview_image() check for
width==0 to avoid floating point exception
2001-11-04 Henning Meier-Geinitz <henning@meier-geinitz.de>
* sane-frontends-lsm: New file. Created Linux Software Map

Wyświetl plik

@ -871,6 +871,8 @@ restore_preview_image (Preview *p)
p->image_width = width;
p->image_height = height;
if ((width == 0) || (height == 0))
return;
p->image_data = malloc (3*width*height);
if (!p->image_data)
return;