shithub: neatroff

Download patch

ref: 486ba81d7f73a2aca7a03eb1691b644ba773852b
parent: 1060697b5f0b60a13f90e54eb430b64e5fae1d8d
author: Ali Gholami Rudi <ali@rudi.ir>
date: Thu Nov 27 20:41:29 EST 2014

roff: long for memory size in mextend()

--- a/roff.c
+++ b/roff.c
@@ -25,7 +25,7 @@
 	exit(1);
 }
 
-void *mextend(void *old, int oldsz, int newsz, int memsz)
+void *mextend(void *old, long oldsz, long newsz, int memsz)
 {
 	void *new = xmalloc(newsz * memsz);
 	memcpy(new, old, oldsz * memsz);
--- a/roff.h
+++ b/roff.h
@@ -378,7 +378,7 @@
 void errmsg(char *msg, ...);
 void errdie(char *msg);
 void *xmalloc(long len);
-void *mextend(void *old, int oldsz, int newsz, int memsz);
+void *mextend(void *old, long oldsz, long newsz, int memsz);
 /* utf-8 parsing */
 int utf8len(int c);
 int utf8next(char *s, int (*next)(void));