aboutsummaryrefslogtreecommitdiff
path: root/graphics/gocr
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2006-04-16 09:27:50 +0000
committerMartin Blapp <mbr@FreeBSD.org>2006-04-16 09:27:50 +0000
commit47e9e3857c0b3841add48041a04513bc7f7f46c1 (patch)
treefb93b622e8d0768addd8c3f49bcd81f4f3ac9df5 /graphics/gocr
parentbc525a73f74330c40267c3b9eb0158b790b24450 (diff)
downloadports-47e9e3857c0b3841add48041a04513bc7f7f46c1.tar.gz
ports-47e9e3857c0b3841add48041a04513bc7f7f46c1.zip
Fix segfault which happens with some gray scale pictures.
Notes
Notes: svn path=/head/; revision=159684
Diffstat (limited to 'graphics/gocr')
-rw-r--r--graphics/gocr/files/patch-segfault19
1 files changed, 19 insertions, 0 deletions
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'