Always treat negative limits passed to log as no limit.
Always treat negative limits passed to log as no limit.

Currently our API doesn't document what our behavior is in this case.  In
practice our behavior is that negative limits are treated as unlimited.
But they are treated this way due to the quirks of the types we're using and
C's comparision rules.  We check for truth of limit (which means not zero) and
then compare our calculated number of logs we will send (stored in an
apr_uint64_t) with the limit (stored in an int).  When comparing an unsinged
integer to a signed integer the signed value is automatically cast to unsigned
by C.  In this case it also widens the value to a 64-bit unsigned int.  Which
means the negative limit becomes a very large limit that's impossible to reach
due to our current revision number limits.  However, if we ever fix that this
code could end up in a situation where negative limits behave as some rather
large limit.

* subversion/libsvn-repos/log.c
  (svn_repos_get_logs5): Only apply positive limits.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1570330 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion