The new curl was segfaulting on some of my work stuff. I built with debugging and narrowed it down. The attached patch fixes the issue, and possibly a few more lurking ones. Please pass it to upstream.
Created attachment 135829 [details, diff] curl-7.17.1-null-handler-segfault.patch
added curl-7.17.1 with your patch - thanks Robin. Chunk 1 was fixed so the upstream patch omits that. Thanks.