--- gkeyfile.c.1	2011-05-15 00:10:11.658733525 -0400
+++ gkeyfile.c	2011-05-15 00:05:08.333710113 -0400
@@ -990,7 +990,13 @@
             }
         }
       else
-        g_string_append_c (key_file->parse_buffer, data[i]);
+        {
+          /* g_string_append_c (key_file->parse_buffer, data[i]); */
+          const gchar *c = memchr (data + i, '\n', length - i);
+          gsize n = (c != NULL) ? c - (data + i) : length - i;
+          g_string_append_len (key_file->parse_buffer, data + i, n);
+          i += n - 1;
+        }
     }
 
   key_file->approximate_size += length;
