HttpConn: judge nb_chunk no memory address. (#3465)

Co-authored-by: john <hondaxiao@tencent.com>
pull/3460/head^2
chundonglinlin 2 years ago committed by GitHub
parent 2708752a9b
commit 5067e220ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1162,7 +1162,9 @@ srs_error_t SrsHttpResponseReader::read_chunked(void* data, size_t nb_data, ssiz
if (nb_chunk <= 0) { if (nb_chunk <= 0) {
// for the last chunk, eof. // for the last chunk, eof.
is_eof = true; is_eof = true;
if (nb_read) {
*nb_read = 0; *nb_read = 0;
}
} else { } else {
// for not the last chunk, there must always exists bytes. // for not the last chunk, there must always exists bytes.
// left bytes in chunk, read some. // left bytes in chunk, read some.

Loading…
Cancel
Save