Once that is done it's incredibly easy for these kind of bugs to go un-noticed for a long time.
As everyone is of course no doubt aware, subtraction of pointers is only valid in C if you can guarantee that the pointers point to the same "object" (or at most 1 character past the end of an object).
I would prefer an interface using a size_t count of available space, rather than passing an end-pointer around.
Again, this is based solely on reading the patch, so it might be perfectly fine. Considering nginx' reputation, I guess it's academic.
The subtraction also has a (very theoretical) problem that its result must fit in ptrdiff_t (signed), and it would produce undefined behavior when you have a huge object whose size doesn't fit in ptrdiff_t (but does in size_t, by definition).
http://nginx.org/download/patch.2014.spdy2.txt