bugGNU gettext - Bugs: bug #43720, msgfilter aborts with empty msgstr

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43720: msgfilter aborts with empty msgstr

Submitted by:  Robin McCorkell <xenopathic>
Submitted on:  Thu 27 Nov 2014 11:07:32 PM UTC  
 
Category: Translator toolsSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Daiki Ueno <ueno>
Open/Closed: Closed

Fri 28 Nov 2014 04:29:54 AM UTC, comment #1:

Thanks for the report. It seems you hit a corner case. When the read buffer is filled up, msgfilter.c:prepare_read tries to increase the size by 1.5 times larger than the previous size:

However, if the original l->allocated is 1, the size doesn't change.

I've pushed a fix:
http://git.sv.gnu.org/cgit/gettext.git/commit/?id=06e206f5

Daiki Ueno <ueno>
Project AdministratorIn charge of this item.
Thu 27 Nov 2014 11:07:32 PM UTC, original submission:

When running msgfilter on a .po file that contains an empty msgstr, and the command prints anything, then msgfilter will abort. The abort does not occur however if the msgstr is non-empty, or if the command doesn't output anything.

For example:

msgfilter -i test.po cat #doesn't abort, empty msgstr prints nothing
msgfilter -i test.po echo -n #doesn't abort, no output
msgfilter -i test.po echo -n 'a' #aborts on empty msgstr
msgfilter -i test.po echo #aborts on empty msgstr

I did a bit of debugging, and it seems that the abort is called from pipe_filter_ii_execute in gnulib/lib/pipe-filter-ii.c:270, which doesn't make much sense as that should only be called if setting the SIGPIPE signal handler fails... which is totally unrelated to the output of the filter program?

Robin McCorkell <xenopathic>

 

Attached Files
file #32564:  test.po added by xenopathic (115B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by ueno (Posted a comment)
  • -unavailable- added by xenopathic (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 11:55:28 AM UTChaibleCategoryNone=>Translator tools
      Assigned toNone=>ueno
    Fri 28 Nov 2014 04:29:54 AM UTCuenoStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 27 Nov 2014 11:07:32 PM UTCxenopathicAttached File-=>Added test.po, #32564

    Back to the top


    Powered by Savane 3.1-cleanup1