From 47e9e3857c0b3841add48041a04513bc7f7f46c1 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Sun, 16 Apr 2006 09:27:50 +0000 Subject: Fix segfault which happens with some gray scale pictures. --- graphics/gocr/files/patch-segfault | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 graphics/gocr/files/patch-segfault (limited to 'graphics/gocr') diff --git a/graphics/gocr/files/patch-segfault b/graphics/gocr/files/patch-segfault new file mode 100644 index 000000000000..4d25d8f9ea34 --- /dev/null +++ b/graphics/gocr/files/patch-segfault @@ -0,0 +1,19 @@ +--- src/pgm2asc.c Fri Apr 14 11:07:42 2006 ++++ src/pgm2asc.c Fri Apr 14 11:06:15 2006 +@@ -1200,6 +1200,7 @@ + } end_for_each(&(JOB->res.boxlist)); + box4=box5; + { ++ if (box2 != NULL && box4 != NULL){ + if( /* umlaut "a "o "u, ij; box2 is the dot, box4 the body */ + ( y1<=box2->m2 + && box4->x1>=3*x0-2*x1 /* test if box4 is around box2 */ +@@ -1252,7 +1253,7 @@ + list_del(&(JOB->res.boxlist), box4); /* ret&1: error-message ??? */ + free(box4); + } +- } ++ }} + } + // continue; + // horizontally broken w' K' -- cgit v1.2.3