htstress
htstress copied to clipboard
Some fixups, bug fixes, and add IPv6 and unix socket type support.
Hi @cheako thanks for making these changes. One thing I noticed is that I'm getting a core dump when I targeting my localhost like this: "./htstress -n 1 -c 1 -t 1 localhost:80". The crash happens at line #454 I think the reason for that is the way how you parse hostname/port.
You shouldn't get to 454 without any '/'. https://github.com/cheako/htstress/blob/cf39f496df8a99a92fd296a507a45dd75bdd6882/htstress.c#L453
454 copies the text from ':' to '/' exclusively. This could be a name like "http" or a number in string form like "80". The important part is the inclusion of a null terminator that strndup() adds.