Package: git
Version: 1:2.11.0-2
Severity: important
Tags: upstream l10n

When doing any git bisect with current git and LANG=ru_RU.UTF8,
it fails with 100% cases with the following message:

 fatal: BUG: attempt to snprintf into too-small buffer

This is because bisect.c:bisect_next_all() contains
the following code:

int bisect_next_all(const char *prefix, int no_checkout)
{
..
        char steps_msg[32];
..
        xsnprintf(steps_msg, sizeof(steps_msg),
                  Q_("(roughly %d step)", "(roughly %d steps)", steps),
                  steps);
..

With for example russian locale (which uses utf8), the buffer
is 2 byte too small to fit translation of "(roughly %d steps)"
message, or more depending on the actual number of steps.

Setting locale to something else helps ofcourse.

I _guess_ this buffer was initially used to hold only actual
number without any extra words, words were added later and
translated to other languages even more later.. So here we
are.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-debug'), (500, 'stable'), (500, 
'oldstable'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=ru_RU.utf8, LC_CTYPE=ru_RU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages git depends on:
ii  dpkg             1.18.23
ii  git-man          1:2.11.0-2
ii  libc6            2.24-9
ii  libcurl3-gnutls  7.52.1-4
ii  liberror-perl    0.17024-1
ii  libexpat1        2.2.0-2
ii  libpcre3         2:8.35-3.3+deb8u4
ii  perl             5.24.1-2
ii  zlib1g           1:1.2.8.dfsg-5

Versions of packages git recommends:
ii  less                         481-2.1
ii  openssh-client [ssh-client]  1:7.4p1-10
ii  patch                        2.7.5-1+b2
ii  rsync                        3.1.2-1

Versions of packages git suggests:
ii  gettext-base                          0.19.8.1-2
pn  git-arch                              <none>
pn  git-cvs                               <none>
pn  git-daemon-run | git-daemon-sysvinit  <none>
pn  git-doc                               <none>
pn  git-el                                <none>
pn  git-email                             <none>
pn  git-gui                               <none>
pn  git-mediawiki                         <none>
pn  git-svn                               <none>
pn  gitk                                  <none>
pn  gitweb                                <none>

-- no debconf information

Reply via email to