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