[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext: German character in <ref.po> causes msgmerge to abort
From: |
Bruno Haible |
Subject: |
Re: gettext: German character in <ref.po> causes msgmerge to abort |
Date: |
Sat, 12 May 2001 02:14:04 +0200 (CEST) |
Felix Natter writes:
> If I try to apply msgmerge to a file which contains the German character ß
> (sharp s), msgmerge stops with abort().
> This also occurs when I msgmerge po-files of the GIMP, so it is most
> likely a bug.
>
> I am using version 0.10.37. This doesn't happen with gettext 0.10.35.
>
> here is a backtrace
> (the two files can be found here:
> http://www.ndh.net/home/natter/de.po.old
> and here:
> http://www.ndh.net/home/natter/project.pot)
Thanks for the report. This patch fixes it.
Bruno
*** lib/linebreak.c 2001/04/04 13:41:11 1.4
--- lib/linebreak.c 2001/05/02 11:57:56 1.5
***************
*** 1630,1635 ****
--- 1630,1641 ----
const char *inptr;
char *outptr;
size_t outsize;
+ /* Avoid glibc-2.1 bug. */
+ #if !defined _LIBICONV_VERSION && (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0
<= 1)
+ const size_t extra = 1;
+ #else
+ const size_t extra = 0;
+ #endif
for (i = 0; i < n; i++)
offtable[i] = (size_t)(-1);
***************
*** 1637,1643 ****
s_end = s + n;
inptr = s;
outptr = t;
! outsize = m;
while (inptr < s_end)
{
size_t insize;
--- 1643,1649 ----
s_end = s + n;
inptr = s;
outptr = t;
! outsize = m + extra;
while (inptr < s_end)
{
size_t insize;
***************
*** 1664,1670 ****
abort ();
#endif
/* We should have produced exactly m output bytes. */
! if (outsize != 0)
abort ();
}
--- 1670,1676 ----
abort ();
#endif
/* We should have produced exactly m output bytes. */
! if (outsize != extra)
abort ();
}