libfcgi
libfcgi copied to clipboard
Assertion in fcgiapp.c:82 will fail in most cases
ASSERT(size == 0 || result != NULL);
Won't this assertion fail when you try to allocate anything more than 0 bytes? Shouldn't it be ASSERT(size != 0 || result != NULL)?
If this is intentional, can you explain why?
Having looked at it again, as long as malloc returns a valid pointer, the assertion passes. I guess the only way this assertion would not work properly is if given size == 0, malloc returns a non-zero pointer. Not sure if that's something worth worrying about... is it?