...版本无此bug) #define SCWS_WORD_MALLOCED 0x100 只要将 0x100 改变 0x80 即可,因为 struct scws_word 中定义的 flag 为 unsigned char 即 8bit, 容不下 0x100 导致,所有的 ->flag |= SCWS_WORD_MALLOCED 失效,以至于在 scws.c 中无法正确的释放这些内存。 再...
... char,故导致该 flag 失效从而造成内存泄露,将其值改为 0x80 即可。此 bug 仅存在于 1.1.0 版。(感谢[url=http://www.hightman.cn/bbs/showthread.php?tid=716]backluck的报告[/url]) 下载地址 http://www.ftphp.com/scws/down/scws-1.1.1.tar.bz2 附带修正了 php...
... } // just cache the cmd for those need not answer if ($cmd->cmd & 0x80) { $this->_sendBuffer .= $cmd; return true; } // send cmd to server $buf = $this->_sendBuffer . $cmd; $this->_sendBuffer = ''; $this->write($buf); // return true directly for local file ...
... } // just cache the cmd for those need not answer if ($cmd->cmd & 0x80) { $this->_sendBuffer .= $cmd; return true; } // send cmd to server $buf = $this->_sendBuffer . $cmd; $this->_sendBuffer = ''; $this->write($buf); // return true directly for local file ...