[curl/curl] 76f33f: c-hyper: don't write to set.writeheader if null
Kevin Burke <[email protected]>
| Newsgroups | gmane.comp.web.curl.cvs |
|---|---|
| Message-ID | <curl/curl/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/curl/curl
Commit: 76f33fd373f2d1c9ff8a090a65c254fe7a4a9864
https://github.com/curl/curl/commit/76f33fd373f2d1c9ff8a090a65c254fe7a4a9864
Author: Kevin Burke <[email protected]>
Date: 2021-04-27 (Tue, 27 Apr 2021)
Changed paths:
M lib/c-hyper.c
Log Message:
-----------
c-hyper: don't write to set.writeheader if null
Previously if a caller set CURLOPT_WRITEFUNCTION but did not set a
CURLOPT_HEADERDATA buffer, Hyper would still attempt to write headers to
the data->set.writeheader header buffer, even though it is null. This
led to NPE segfaults attempting to use libcurl+Hyper with Git, for
example.
Instead, process the client write for the status line using the same
logic we use to process the client write for the later HTTP headers,
which contains the appropriate guard logic. As a side benefit,
data->set.writeheader is now only read in one file instead of two.
Fixes #6619
Fixes abetterinternet/crustls#49
Fixes hyperium/hyper#2438
Closes #6971
_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits