News for hackers. Stuff that matters.
Re:Nginx sucks at SSL, here's what to do instead by fleitz on Monday July 11, 2011 @04:35PM (#2752410)
"malloc(size+1)" is a sign you may have one off errors in your code. If you need to store a string of size s you need s+1 bytes allocated. The plus one is for null termination. If you want an array of t you can either pass the size around with the array or null terminate the array like strings, but then you can't store any null values in the array.

Also, there's no bounds checking on size so in certain conditions such as a 2GB/4GB allocation you may allocate zero bytes or -2GB bytes.

There are no comments on this comment yet.