Re:Is All Programming a Scam?
by mkristiansen on Tuesday July 11, 2023 @04:34PM
(#36686873)
Thank you, you are right - and I appreciate the rusty pun. I think, as a general thing, there are a few things that I would do differently if I wanted to build a production version of this code. Firstly I would find a better way of parsing the headers. :)
Seems to me like "read" will read exactly BUFFER_SIZE "A"s and no null-terminator, causing the subsequent "strsep" to find the first \n... someplace in memory (after the buffer) and overwrite it with a null-terminator.