diff -Naur glib-2.46.0-orig/glib/gnulib/printf.c glib-2.46.0/glib/gnulib/printf.c
--- glib-2.46.0-orig/glib/gnulib/printf.c	2014-12-20 00:49:48.000000000 +0300
+++ glib-2.46.0/glib/gnulib/printf.c	2015-09-22 09:09:03.834633700 +0300
@@ -88,16 +88,16 @@
 int _g_gnulib_vfprintf (FILE *file, char const *format, va_list args)
 {
   char *result;
-  size_t length;
+  size_t length, rlength;
 
   result = vasnprintf (NULL, &length, format, args);
   if (result == NULL) 
     return -1;
 
-  fwrite (result, 1, length, file);
+  rlength = fwrite (result, 1, length, file);
   free (result);
   
-  return length;
+  return rlength;
 }
 
 int _g_gnulib_vsprintf (char *string, char const *format, va_list args)
