Skip to content

Commit 8ad62a1

Browse files
committed
Harden parsing of the start/length header
1 parent 504fb20 commit 8ad62a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/patch.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ let to_start_len data =
130130
(st, len)
131131

132132
let count_to_sl_sl data =
133-
if String.is_prefix ~prefix:"@@" data then
133+
if String.is_prefix ~prefix:"@@ -" data then
134134
(* input: "@@ -19,23 +19,12 @@ bla" *)
135135
(* output: ((19,23), (19, 12)) *)
136136
match List.filter (function "" -> false | _ -> true) (String.cuts '@' data) with

0 commit comments

Comments
 (0)