Package: gettext
Version: 0.19.2-2
Severity: minor
Usertags: afl

msgunfmt aborts when trying to print some strings containing incomplete UTF-8 characters:

$ msgfmt invalid-utf8.po -o invalid-utf8.mo
$ msgunfmt invalid-utf8.mo
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8\n"

msgid "x"
Aborted


Backtrace:
#0  0xf7bb6ddc in raise () from /lib/i386-linux-gnu/libc.so.6
#1  0xf7bb8463 in abort () from /lib/i386-linux-gnu/libc.so.6
#2  0xf7f6529b in wrap (mp=0x0, mp@entry=0x80533c8, stream=0x6, stream@entry=0x80531b0, line_prefix=0x0, extra_indent=0, 
css_class=0xf7fbede2 <class_msgstr> "msgstr", name=0xf7fbd425 "msgstr", value=0x80532d4 
"\333", do_wrap=undecided, page_width=79, charset=0xffffd608 "UTF-8") at write-po.c:805
#3  0xf7f6b3ba in message_print (debug=false, blank_line=<optimized out>, page_width=79, 
charset=0xffffd608 "UTF-8", stream=0x80531b0, mp=0x80533c8) at write-po.c:1356
#4  msgdomain_list_print_po (mdlp=0x80530f0, stream=0x80531b0, page_width=79, 
debug=false) at write-po.c:1579
#5  0xf7f60ca5 in msgdomain_list_print (mdlp=0x80530f0, filename=0xf7fbea0f "standard 
output", output_syntax=0x8052304 <output_format_po>, force=false, debug=false) at 
write-catalog.c:246
#6  0x08049ebc in main (argc=2, argv=0xffffd7e4) at msgunfmt.c:411


I would expect that the incomplete character is ignored (with the usual "invalid multibyte sequence" warning); or at least that a reason for aborting is given.


This bug was brought to you by american-fuzzy-lop:
https://code.google.com/p/american-fuzzy-lop

-- System Information:
Debian Release: jessie/sid
 APT prefers unstable
 APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.16-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gettext depends on:
ii  dpkg           1.17.13
ii  gettext-base   0.19.2-2
ii  install-info   5.2.0.dfsg.1-4
ii  libc6          2.19-11
ii  libcroco3      0.6.8-3
ii  libglib2.0-0   2.42.0-1
ii  libgomp1       4.9.1-16
ii  libncurses5    5.9+20140913-1
ii  libtinfo5      5.9+20140913-1
ii  libunistring0  0.9.3-5.2
ii  libxml2        2.9.1+dfsg1-4

Versions of packages gettext recommends:
ii  autopoint         0.19.2-2
ii  curl              7.38.0-2
ii  libasprintf-dev   0.19.2-2
ii  libgettextpo-dev  0.19.2-2
ii  wget              1.15-1+b1

--
Jakub Wilk
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"

msgid "x"
msgstr "\333"

Reply via email to