Bill Pringlemeir wrote: > The particular link is in "vp_draw_chunk". > bpp = v->file_size / (v->context->width); > > s_from = chunk->from / bpp; > s_to = chunk->to / bpp; > "v->file_size" is most likely zero because the file has been moved or > removed. Should the code register a signal handler for the division > by zero
There's hardly any way to rely on anything from there on, you would risk any kind of undefined behaviour - whatsoever. There's no portable I know of to resume from a division-by-zero. > or should there be checks put in place Sure, there has to be a check that bpp is greater than zero, which isn't guaranteed here at all, AFAICS. > or should users not touch files that GTKG is looking at? Better not, using the "Purge" button alone should have been sufficient. Nevertheless, GTKG should be able to handle this. Especially, since this looks pretty much as a simple oversight and we're talking about the GUI not any core feature. -- Christian
pgp00000.pgp
Description: PGP signature
