22 lines
678 B
Plaintext
22 lines
678 B
Plaintext
|
$OpenBSD: patch-pbm_pbmtoppa_pbm_c,v 1.1 2003/03/29 04:13:54 brad Exp $
|
||
|
--- pbm/pbmtoppa/pbm.c.orig Thu Jun 1 13:20:30 2000
|
||
|
+++ pbm/pbmtoppa/pbm.c Fri Mar 28 20:22:06 2003
|
||
|
@@ -105,6 +105,7 @@ int pbm_readline(pbm_stat* pbm,unsigned
|
||
|
return 0;
|
||
|
|
||
|
case P4:
|
||
|
+ overflow_add(pbm->width, 7);
|
||
|
tmp=(pbm->width+7)/8;
|
||
|
tmp2=fread(data,1,tmp,pbm->fptr);
|
||
|
if(tmp2 == tmp)
|
||
|
@@ -129,7 +130,8 @@ void pbm_unreadline (pbm_stat *pbm, void
|
||
|
return;
|
||
|
|
||
|
pbm->unread = 1;
|
||
|
- pbm->revdata = malloc ((pbm->width+7)/8);
|
||
|
+ overflow_add(pbm->width, 7);
|
||
|
+ pbm->revdata = malloc((pbm->width+7)/8);
|
||
|
memcpy (pbm->revdata, data, (pbm->width+7)/8);
|
||
|
pbm->current_line--;
|
||
|
}
|