[Bug 697970] info: glibc "%n in writable segment detected" with new printf implementation

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Apr 14 03:42:02 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=697970
  GStreamer | gstreamer (core) | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|HEAD                        |1.1.1
            Summary|the first gst printf bug    |info: glibc "%n in writable
                   |(may it be the last)        |segment detected" with new
                   |                            |printf implementation

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2013-04-14 10:41:56 UTC ---
Well, let's do this then. I don't think there's much else we can do:

 commit 91c42b938001bfd68acb6af951603cebc1bea75b
 Author: Tim-Philipp Müller <tim at centricular.net>
 Date:   Sun Apr 14 11:23:10 2013 +0100

    printf: use sprintf() to work around glibc complaining about %n in a
writable format string

    Don't use snprintf(), but use sprintf instead and do our own
    length calculations, because glibc may complain about us passing
    %n in a format string if the string is in writable memory, and
    here the format string is always in writable memory since we
    construct it on the fly. This happens if glibc has been compiled
    with _FORTIFY_SOURCE=2, which seems to be the case on some
    distros/systems). On the upside, we now use the sprintf code path
    on all systems which should be better from a maintenance point
    of view.

    https://bugzilla.gnome.org/show_bug.cgi?id=697970

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list