After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 627969 - ABR in g_file_open_tmp
ABR in g_file_open_tmp
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.25.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-08-25 17:55 UTC by Morten Welinder
Modified: 2010-08-26 00:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2010-08-25 17:55:44 UTC
The code fragment below will access memory it doesn't own if tmpdir is
the empty string.  (tmpdir shouldn't be empty, but can be if the
environment is set appropriately.)

  tmpdir = g_get_tmp_dir ();

  if (G_IS_DIR_SEPARATOR (tmpdir [strlen (tmpdir) - 1]))
Comment 1 Matthias Clasen 2010-08-25 23:52:30 UTC
Right. g_get_any_init_do should not accept an empty string for g_tmp_dir
Comment 2 Matthias Clasen 2010-08-26 00:07:18 UTC
I've made it so