现在租用的服务器上都不敢开GD库了,
不知道大家的服务器开了没有?
有什么解决办法吗?
网上搜了一下,找到一个非官方修复方法:
diff -r -c gd-2.0.33.orig/gd_gif_in.c gd-2.0.33/gd_gif_in.c
*** gd-2.0.33.orig/gd_gif_in.c Mon Nov 1 19:28:56 2004
--- gd-2.0.33/gd_gif_in.c Fri Apr 7 09:04:10 2006
***************
*** 417,422 ****
--- 417,423 ----
GetCode(fd, code_size, FALSE,
ZeroDataBlockP);
return firstcode;
} else if (code == end_code) {
+ int maxcount = 1024;
int count;
unsigned char buf[260];
***************
*** 423,432 ****
if (*ZeroDataBlockP)
return -2;
! while ((count = GetDataBlock(fd, buf,
ZeroDataBlockP)) > 0)
;
! if (count != 0)
return -2;
}
--- 424,433 ----
if (*ZeroDataBlockP)
return -2;
! while ((count = GetDataBlock(fd, buf,
ZeroDataBlockP)) > 0 && --maxcount >= 0)
;
! if (count != 0 maxcount < 0)
return -2;
}
但是不会用,这段代码加到哪里呢,谁会?:) |