On Wednesday 26 October 2011, Jim Jagielski wrote: > On Oct 25, 2011, at 6:29 PM, [email protected] wrote: > > + if (len > maxlen && maxlen > 0) > > + return APR_ENOMEM; > > + > > > > if (!vb) { > > > > - dest = dst = apr_pcalloc(p, len + 1); > > + *result = dst = apr_pcalloc(p, len + 1); > > if len == maxlen and == APR_SIZE_MAX then doesn't > the len+1 blow us up?
APR_SIZE_MAX means no limit, i.e. it will blow up when there is no memory left, which will be well before APR_SIZE_MAX. I guess I should have used 0, that would have been clearer.
