From: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
d33tah@gmail.com, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: [PATCH 4/3] sha1_file.c: mark strings for translation
Date: Sat, 27 Feb 2016 14:49:33 +0700 [thread overview]
Message-ID: <1456559373-13589-1-git-send-email-pclouds@gmail.com> (raw)
In-Reply-To: <20160225142004.GA17678@sigill.intra.peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
Since jk/pack-idx-corruption-safety is already in 'next', can we add
this patch on top? Surrounding strings are handled separately [1] by
another series.
[1] http://thread.gmane.org/gmane.comp.version-control.git/287661/focus=287678
sha1_file.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sha1_file.c b/sha1_file.c
index 4a3a032..b8da68b 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -1042,7 +1042,7 @@ unsigned char *use_pack(struct packed_git *p,
if (offset > (p->pack_size - 20))
die("offset beyond end of packfile (truncated pack?)");
if (offset < 0)
- die("offset before end of packfile (broken .idx?)");
+ die(_("offset before end of packfile (broken .idx?)"));
if (!win || !in_window(win, offset)) {
if (win)
@@ -2367,11 +2367,11 @@ void check_pack_index_ptr(const struct packed_git *p, const void *vptr)
const unsigned char *start = p->index_data;
const unsigned char *end = start + p->index_size;
if (ptr < start)
- die("offset before start of pack index for %s (corrupt index?)",
+ die(_("offset before start of pack index for %s (corrupt index?)"),
p->pack_name);
/* No need to check for underflow; .idx files must be at least 8 bytes */
if (ptr >= end - 8)
- die("offset beyond end of pack index for %s (truncated index?)",
+ die(_("offset beyond end of pack index for %s (truncated index?)"),
p->pack_name);
}
--
2.8.0.rc0.205.g7ec8cf1
next prev parent reply other threads:[~2016-02-27 7:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 14:20 [PATCH 0/3] out-of-bounds access from corrupted .idx files Jeff King
2016-02-25 14:21 ` [PATCH 1/3] t5313: test bounds-checks of corrupted/malicious pack/idx files Jeff King
2016-02-25 19:12 ` Johannes Sixt
2016-02-25 20:31 ` Junio C Hamano
2016-02-25 22:07 ` Jeff King
2016-02-25 14:22 ` [PATCH 2/3] nth_packed_object_offset: bounds-check extended offset Jeff King
2016-02-25 14:23 ` [PATCH 3/3] use_pack: handle signed off_t overflow Jeff King
2016-02-27 7:49 ` Nguyễn Thái Ngọc Duy [this message]
2016-02-27 17:41 ` [PATCH 4/3] sha1_file.c: mark strings for translation Junio C Hamano
2016-02-27 18:25 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456559373-13589-1-git-send-email-pclouds@gmail.com \
--to=pclouds@gmail.com \
--cc=d33tah@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).