set_msgstr(None) segfaults with gettext >= 0.18.2

Bug #1269662 reported by William Grant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pygettextpo
Fix Released
High
William Grant

Bug Description

set_msgstr(None) tries to set the msgstr to NULL, despite po_message_set_msgstr being documented as taking a string, with "" being used to represent the lack of a translation. This works fine in old gettexts, as po_message_set_msgstr is a no-op if the value hasn't changed. However, gettext 0.18.2 switches the default strings in a message from NULL to "", so po_message_set_msgstr(msg, NULL) is no longer a no-op, and it segfaults.

pygettextpo should translate None to "" instead of NULL.

Related branches

William Grant (wgrant)
Changed in pygettextpo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.