Segfault in HTCP CLR request on 64-bit

From: Jason Noble <jason_at_linuxbox.com>
Date: Fri, 25 Sep 2009 14:39:09 -0400

I recently ran into an issue where Squid 2.7 would segfault trying to
issue HTCP CLR requests. I found the segfault only occurred on 64-bit
machines. While debugging, I found that the value of stuff.S.req_hdrs
was not initialized but later, strlen was being called on it. This
seems to -- by chance -- not fail on 32 bit builds, but always segfaults
on 64-bit. The attached patch fixed the problem for me and it seems
good programming practice to properly initialize pointers to prevent
issues such as this. As the htcpStuff struct is used in other places, I
have concerns that other issues may be lurking as well, although I have
yet to run into them.

Regards,
Jason

Received on Fri Sep 25 2009 - 18:57:05 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 28 2009 - 12:00:05 MDT