patch: segfault fix. Closes 7916
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 11 Mar 2015 17:01:34 +0000 (18:01 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 11 Mar 2015 17:01:34 +0000 (18:01 +0100)
commitfe8b5802bafb7bce7af525237d1195a91a3e4af4
tree5d75f8fbabf93e2e5901ee6269425eabd126b5be
parent7b434a67dcaa88047095cf0196941c5456bb1c87
patch: segfault fix. Closes 7916

Fix segfault on this case (malformed --- line):

    -- dwarves.orig 2015-02-25 01:45:27.753000000 +0000
    +++ dwarves     2015-02-25 01:46:08.199000000 +0000
    @@ -1,7 +1,7 @@
     Bashful
     Doc
     Dopey
    -Grouchy
    +Grumpy
     Happy
     Sleepy
     Sneezy

function                                             old     new   delta
patch_main                                          1903    1957     +54

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/patch.c