Bug 22095 - should use g_strerror, not strerror
Summary: should use g_strerror, not strerror
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: glib frontend (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-04 13:22 UTC by Christian Persch (GNOME)
Modified: 2009-06-05 01:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Christian Persch (GNOME) 2009-06-04 13:22:01 UTC
In poppler-document.cc:

        g_set_error (error, G_FILE_ERROR,
		     g_file_error_from_errno (fopen_errno),
		     strerror(fopen_errno));

This is wrong; it should use g_strerror. See the g_strerror docs: 

You should use this function in preference to strerror(), because it returns a string in UTF-8 encoding, and since not all platforms support the strerror() function.
Comment 1 Carlos Garcia Campos 2009-06-05 01:08:47 UTC
Fixed. Thanks for reporting. 


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.