bugGNU gettext - Bugs: bug #30741, gettextlib accepts comments that...

 
 

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

bug #30741: gettextlib accepts comments that break PO files

Submitted by:  None
Submitted on:  Wed Aug 11 02:05:23 2010  
 
Category: OtherSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: Miguel Ángel Arruga Vivas <m1gu3l>
Open/Closed: Closed

Tue Mar 5 02:54:51 2013, comment #4:

Closing this because we can't handle it without proper escaping rule in the comment syntax and hopefully it would be easy to check if the comment string ends with a backslash in the caller side.

Daiki Ueno <ueno>
Project Administrator
Sun Mar 3 10:13:49 2013, comment #3:

Saturday night patches always need reviewing. Thank you, Daiki. :)

Also comments are welcome, it may not be a bug, because that kind of backslash it is too picky to be real.

(file #27559)

Miguel Ángel Arruga Vivas <m1gu3l>
Project MemberIn charge of this item.
Sun Mar 3 07:56:02 2013, comment #2:

Well, the patch looks not correct.

+ memcpy (".", buffer + length, 2);

memcpy's first argument is the destination, not source.

Also I wonder if we can silently modify the supplied comment like that...

Daiki Ueno <ueno>
Project Administrator
Sun Mar 3 01:49:07 2013, comment #1:

The attached patch is a proposal for testing.

(file #27555)

Miguel Ángel Arruga Vivas <m1gu3l>
Project MemberIn charge of this item.
Wed Aug 11 02:05:23 2010, original submission:

po_message_set_extracted_comments("A comment\\")

Or

po_message_set_comments("A comment\\")

Will create a PO message like this:

# Something \
msgid "One"
msgstr "Een"

msgfmt -cv x.po
Causes this error:
x.po:3:7: syntax error

Problem
=======
gettextlib accepts input that creates broken PO files without complaint.

Solution
========
1) Warn about broken input - not ideal as then tools need to manage checking for broken input
2) Escape \ at the end of the line or pad it with a single space.

Anonymous

 

Attached Files
file #27559:  gettextpo.patch added by m1gu3l (2kB - text/x-patch)
file #27555:  gettextpo.patch added by m1gu3l (2kB - text/x-patch)

 

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 m1gu3l (Updated 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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun Nov 27 00:40:56 2016haibleCategoryNone=>Other
      StatusNot a Bug=>Wont Fix
    Tue Mar 5 02:54:51 2013uenoOpen/ClosedOpen=>Closed
    Mon Mar 4 10:58:26 2013m1gu3lStatusReady For Test=>Not a Bug
    Sun Mar 3 10:13:49 2013m1gu3lAttached File-=>Added gettextpo.patch, #27559
    Sun Mar 3 01:49:07 2013m1gu3lAttached File-=>Added gettextpo.patch, #27555
      StatusNone=>Ready For Test
      Assigned toNone=>m1gu3l

    Back to the top


    Powered by Savane 3.1-cleanup