Skip to content

Commit

Permalink
for-each-ref: fix off by one read.
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Christian Couder authored and Junio C Hamano committed Nov 12, 2007
1 parent 53e780c commit a74fa11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-for-each-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ static const char *find_wholine(const char *who, int wholen, const char *buf, un
if (!eol)
return "";
eol++;
if (eol[1] == '\n')
if (*eol == '\n')
return ""; /* end of header */
buf = eol;
}
Expand Down

0 comments on commit a74fa11

Please sign in to comment.