diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2011-10-28 17:28:28 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-28 08:41:56 -0700 |
commit | 2564aa48ce007ad265c0d31a7cb7513239447d2b (patch) | |
tree | 087f2a1832cebc2aecba80398bb59dce90efa150 /t/t4151-am-abort.sh | |
parent | blame,cat-file --textconv: Don't assume mode is ``S_IFREF | 0664'' (diff) | |
download | tgif-2564aa48ce007ad265c0d31a7cb7513239447d2b.tar.xz |
blame.c: Properly initialize strbuf after calling, textconv_object()
For a plain string where only the length is known, strbuf.alloc needs to
be initialized to the length. Otherwise strbuf.alloc is 0 and a later
call to strbuf_setlen() will fail.
This bug surfaced when calling git blame under Windows on a *.doc file.
The *.doc file is converted to plain text by antiword via the textconv
mechanism. However, the plain text returned by antiword contains DOS line
endings instead of Unix line endings which triggered the strbuf_setlen()
which previous to this patch failed.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4151-am-abort.sh')
0 files changed, 0 insertions, 0 deletions