$OpenBSD: patch-pbm_pbmpscale_c,v 1.1 2003/03/29 04:13:54 brad Exp $
--- pbm/pbmpscale.c.orig	Thu Mar  2 20:14:24 2000
+++ pbm/pbmpscale.c	Fri Mar 28 20:22:06 2003
@@ -108,8 +108,9 @@ main(argc, argv)
    inrow[0] = inrow[1] = inrow[2] = NULL;
    pbm_readpbminit(ifd, &columns, &rows, &format) ;
 
+   overflow2(columns, scale);
    outrow = pbm_allocrow(columns*scale) ;
-   flags = (unsigned char *)malloc(sizeof(unsigned char)*columns) ;
+   flags = (unsigned char *)malloc2(sizeof(unsigned char), columns) ;
    if (flags == NULL) pm_perror("out of memory") ;
 
    pbm_writepbminit(stdout, columns*scale, rows*scale, 0) ;
