$OpenBSD: patch-pbm_thinkjettopbm_l,v 1.1 2003/03/29 04:13:54 brad Exp $ --- pbm/thinkjettopbm.l.orig Fri Jan 4 10:12:53 2002 +++ pbm/thinkjettopbm.l Fri Mar 28 20:22:07 2003 @@ -71,7 +71,9 @@ DIG [0-9] \033\*b{DIG}+W { int l; if (rowCount >= rowCapacity) { + overflow_add(rowCapacity, 100); rowCapacity += 100; + overflow2(rowCapacity, sizeof *rows); rows = realloc (rows, rowCapacity * sizeof *rows); if (rows == NULL) pm_error ("Out of memory."); @@ -163,6 +165,8 @@ int yywrap (void) /* * Quite simple since ThinkJet bit arrangement matches PBM */ + + overflow2(maxRowLength, 8); pbm_writepbminit(stdout, maxRowLength*8, rowCount, 0); packed_bitrow = malloc(maxRowLength);