On 1/28/22 11:08 AM, Alexander Dahl wrote:
> I think this tends to be a question of design philosophy.  Some developers 
> expect libraries to never segfault.

That is something you cannot guarantee in C, basically ever. Libraries
always require that they are called with correct arguments.  Sure, a
NULL pointer could be detected, but calling a function with a NULL
pointer that is not documented to accept one is a bug in the calling
application and results in undefined (!) behavior. That is normal in C
and in MHD's case the "desired" outcome. Just check for the NULL
response object before calling the MHD function, it's better for
everyone involved ;-).

Reply via email to