Home GnuPG

w32: Fix crash due to bad conversions of utf-8 in the clipboard.
d3f20e7883f2Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

w32: Fix crash due to bad conversions of utf-8 in the clipboard.

* src/gpgmetools.c (dos_to_unix): Remove.  Remove all calls.
(dump_data_to_clipboard): Return an error code instead of calling
exit.
* src/gpaexportclipop.c
(gpa_export_clipboard_operation_complete_export): Print success
message only on success.

The removal of dos_to_unix is possible due to the patch
https://bugzilla.gnome.org/show_bug.cgi?id=649390 which will go into
the next Gtk+ 2.24 version.dos_to_unix was anyway not correct because
it scanned for an embedded nul but it is not guaranteed that it is
always called with one.

The other patch which will be helpful is:
https://bugzilla.gnome.org/show_bug.cgi?id=696232
(g_utf8_to_utf16() is not guaranteed to succeed. Check the error and
return if it failed.)

Gpg4win uses both patches.

Details

Provenance
wernerAuthored on Aug 16 2013, 3:18 PM
Parents
rGPA8e7043438fe4: Improve code readability.
Branches
Unknown
Tags
Unknown