Skip to content

Commit a4a9637

Browse files
authored
Fix #700 null pointer exception (#702)
1 parent 5292142 commit a4a9637

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

httplib.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,7 @@ class MultipartFormDataParser {
29492949
bool is_valid() const { return is_valid_; }
29502950

29512951
template <typename T, typename U>
2952-
bool parse(const char *buf, size_t n, T content_callback, U header_callback) {
2952+
bool parse(const char *buf, size_t n, const T &content_callback, const U &header_callback) {
29532953

29542954
static const std::regex re_content_disposition(
29552955
"^Content-Disposition:\\s*form-data;\\s*name=\"(.*?)\"(?:;\\s*filename="
@@ -4273,8 +4273,8 @@ inline bool Server::read_content_core(Stream &strm, Request &req, Response &res,
42734273
}
42744274
return true;
42754275
*/
4276-
return multipart_form_data_parser.parse(buf, n, std::move(multipart_receiver),
4277-
std::move(mulitpart_header));
4276+
return multipart_form_data_parser.parse(buf, n, multipart_receiver,
4277+
mulitpart_header);
42784278
};
42794279
} else {
42804280
out = std::move(receiver);

0 commit comments

Comments
 (0)