Dan Winship 69e12cd3d5 GConverterInputStream: fix an edge case
Reading from a GConverterInputStream with both input_buffer and
converted_buffer non-empty would return bogus data (the data from
converted_buffer would essentially get skipped over, though the
returned nread reflected what the count would be if it hadn't been).

This was never noticed before because (a) it can't happen if all of
your reads are at least as large as either the internal buffer size or
the remaining length of the stream (which covers most real-world use),
and (b) it can't happen if all of your reads are 1 byte (which covers
most of tests/converter-test). (And (c) it only happens for some
converters/input streams.) But this was happening occasionally in
libsoup when content-sniffing a gzipped response, because the
SoupContentSnifferStream would first read 512 bytes (to sniff), and
then pass through larger reads after that.

Fixed and added a test to converter-test.

https://bugzilla.gnome.org/show_bug.cgi?id=676478
2012-05-30 09:02:33 -04:00
..
2012-03-05 06:18:24 -05:00
2010-09-02 22:36:47 +03:00
2011-09-04 17:50:41 -04:00
2011-06-04 10:45:54 -04:00
2009-03-31 19:39:16 -04:00
2012-02-02 16:22:42 +01:00
2010-07-12 18:30:14 -04:00
2010-07-05 00:56:12 -04:00
2010-03-26 09:30:25 -04:00
2010-07-12 18:30:14 -04:00
2010-07-12 18:30:14 -04:00
2010-07-12 18:30:14 -04:00
2012-04-30 09:28:42 -04:00
2010-07-07 19:53:22 -04:00
2012-03-27 12:45:27 -04:00
2012-01-01 19:01:14 +01:00
2012-04-19 10:06:26 +02:00
2011-06-07 08:55:31 +08:00
2012-05-26 10:35:05 +02:00
2011-08-29 14:49:32 -04:00
2012-04-19 10:06:26 +02:00
2011-08-29 14:49:32 -04:00
2010-07-07 19:53:22 -04:00
2011-02-08 10:05:00 -05:00
2011-12-08 18:05:12 -05:00
2012-02-18 09:22:31 +00:00
2011-12-10 21:46:39 -05:00
2011-02-08 10:05:00 -05:00
2010-06-04 19:03:38 +02:00
2011-06-04 18:48:19 -04:00
2012-04-20 14:32:41 +02:00
2012-01-13 17:12:57 +01:00
2011-01-09 21:45:20 +01:00
2011-08-29 14:49:32 -04:00
2010-04-16 23:23:40 -04:00
2011-12-08 18:05:14 -05:00
2012-01-06 16:58:57 +07:00
2011-10-16 21:41:15 -04:00
2012-04-30 09:28:42 -04:00
2012-04-19 10:06:26 +02:00
2012-02-21 01:10:54 +01:00
2011-10-02 22:33:10 -04:00
2011-06-14 18:51:57 -04:00
2011-05-05 14:09:11 -04:00
2012-01-13 17:12:57 +01:00
2009-07-05 22:35:55 -04:00
2011-08-29 14:49:32 -04:00
2010-07-07 19:53:22 -04:00