bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #60328] po_message_add_filepos breaks the file if file path contain


From: Alexander Potashev
Subject: [bug #60328] po_message_add_filepos breaks the file if file path contains spaces
Date: Fri, 2 Apr 2021 11:38:57 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60328>

                 Summary: po_message_add_filepos breaks the file if file path
contains spaces
                 Project: GNU gettext
            Submitted by: aspotashev
            Submitted on: Fri 02 Apr 2021 03:38:55 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

po_message_add_filepos and a subsequent PO file write don't implement
escaping. If you then read such unescaped paths with po_message_filepos, it
interprets the file path as paths to two files.

Steps to reproduce:

1. Modify a PO file with libgettextpo in a way to add a reference to file
"abc.txt/de f.txt".

2. In the output PO you get:

#: abc.txt/de f.txt:42

3. Read the output PO with libgettextpo again. po_message_filepos() interprets
the file references as (two references instead of one): [{abc.txt/de -1}
{f.txt 42}]




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60328>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]