News for hackers. Stuff that matters.
Re:Nginx sucks at SSL, here's what to do instead by __rkaup__ on Monday July 11, 2011 @04:29PM (#2752378)
I'm quite new to C programming. What's wrong with doing those things?
Re:Nginx sucks at SSL, here's what to do instead by tptacek on Monday July 11, 2011 @04:32PM (#2752394)
Numbers can't grow indefinitely; they wrap (usually at the size of the register).
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.