printf: use sprintf() to work around glibc complaining about %n in a writable format string
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

jpxiong/gstreamer,ensonic/gstreamer,jpakkane/gstreamer,cfoch/gstreamer,mparis/gstreamer,surround-io/gstreamer,cablelabs/gstreamer,cfoch/gstreamer,shelsonjava/gstreamer,StreamUtils/gstreamer,Lachann/gstreamer,shelsonjava/gstreamer,surround-io/gstreamer,lovebug356/gstreamer,ensonic/gstreamer,ensonic/gstreamer,lubosz/gstreamer,jpakkane/gstreamer,collects/gstreamer,Lachann/gstreamer,mparis/gstreamer,krichter722/gstreamer,cfoch/gstreamer,ensonic/gstreamer,cfoch/gstreamer,lovebug356/gstreamer,justinjoy/gstreamer,collects/gstreamer,surround-io/gstreamer,krieger-od/gstreamer,justinjoy/gstreamer,surround-io/gstreamer,collects/gstreamer,cablelabs/gstreamer,Lachann/gstreamer,krieger-od/gstreamer,shelsonjava/gstreamer,justinjoy/gstreamer,Lachann/gstreamer,cfoch/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,mparis/gstreamer,jpxiong/gstreamer,lovebug356/gstreamer,jpxiong/gstreamer,collects/gstreamer,surround-io/gstreamer,Lachann/gstreamer,mparis/gstreamer,collects/gstreamer,centricular/gstreamer,krichter722/gstreamer,mparis/gstreamer,justinjoy/gstreamer,shelsonjava/gstreamer,krieger-od/gstreamer,lovebug356/gstreamer,krichter722/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,cablelabs/gstreamer,jpakkane/gstreamer,lubosz/gstreamer,centricular/gstreamer,lubosz/gstreamer,cablelabs/gstreamer,lubosz/gstreamer,StreamUtils/gstreamer,jpxiong/gstreamer,krichter722/gstreamer,jpakkane/gstreamer,StreamUtils/gstreamer,justinjoy/gstreamer,centricular/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,centricular/gstreamer,jpakkane/gstreamer,ensonic/gstreamer,lovebug356/gstreamer,lubosz/gstreamer,krichter722/gstreamer,jpxiong/gstreamer,cablelabs/gstreamer