Index: external/sane/sane-frontends/src/preview.c diff -u external/sane/sane-frontends/src/preview.c:1.3 external/sane/sane-frontends/src/preview.c:1.4 --- sane-frontends/src/preview.c:1.3 Fri Aug 3 13:57:49 2001 +++ sane-frontends/src/preview.c Thu Nov 29 10:15:33 2001 @@ -871,6 +871,8 @@ 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;