Commit 7bbdcbd
authored
patch: improve validation of normal diffs (2) (briandfoy#955)
* In a Normal diff the commands c and d operate on a line number range written as x,y
* The range 2,1 is not valid
* Reject a diff if a backwards range is seen to avoid incorrectly processing a file, then reporting "successful patch"
* I found this when testing against the GNU version1 parent 71d1681 commit 7bbdcbd
1 file changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
213 | 221 | | |
214 | 222 | | |
215 | 223 | | |
| |||
0 commit comments