mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
修复可能访问空指针的问题
This commit is contained in:
parent
b3ad0891e6
commit
8b1d1d6e24
@ -236,7 +236,7 @@ static inline void addHttpListener(){
|
||||
auto &content = parser.Content();
|
||||
log << "# content:\r\n" << (content.size() > 4 * 1024 ? content.substr(0, 4 * 1024) : content) << "\r\n";
|
||||
|
||||
if (size && size < 4 * 1024) {
|
||||
if (size > 0 && size < 4 * 1024) {
|
||||
auto response = body->readData(size);
|
||||
log << "# response:\r\n" << response->data() << "\r\n";
|
||||
invoker(code, headerOut, response);
|
||||
|
Loading…
Reference in New Issue
Block a user