freebsd-ports/x11/XFree86-4-libraries/files/patch-imLcPrs.c
Eric Anholt 236b06cf9b [1] Move the recently committed patch-common_x86.c to XFree86-4-libraries
so it covers libOSMesa, too.
[2] Reduce stack usage in libX11 (helps JDK 1.4)

PR:		[1] ports/46037
Submitted by:	[2] phantom
Approved by:	portmgr
2002-12-08 05:37:30 +00:00

18 lines
454 B
C

--- lib/X11/imLcPrs.c.orig Wed Dec 4 00:16:59 2002
+++ lib/X11/imLcPrs.c Wed Dec 4 00:17:44 2002
@@ -518,13 +518,13 @@
FILE *fp;
DefTree **ptop;
{
- char tb[65535];
+ char tb[8192];
char* tbp;
struct stat st;
if (fstat (fileno (fp), &st) != -1) {
unsigned long size = (unsigned long) st.st_size;
- if (size < sizeof tb) tbp = tb;
+ if (size <= sizeof tb) tbp = tb;
else tbp = malloc (size);
if (tbp != NULL) {