Fix various bugs in file seeking and EOF handling in 'svn patch'.
Fix various bugs in file seeking and EOF handling in 'svn patch'.

* subversion/libsvn_client/patch.c
  (read_line): Don't increment the current line counter past EOF.
  (seek_to_line): Don't attempt to seek past EOF, fixing an endless loop.
   If the EOF indicator was set before seeking backwards, clear it.
  (match_hunk, scan_for_match, get_hunk_info): Don't clear EOF indicator,
   seek_to_line() does this now. And don't seek past EOF.
  (apply_hunk): If seeking past the hunk's original length fails,
   reject the hunk. Note that since the hunk was already matched
   successfully, this failure is unlikely.
   Add a ### comment about an unrelated bug discovered recently.


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

wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion