Avi Kivity
03531c2443
fragmented_temporary_buffer: fix read_exactly() during premature end-of-stream
...
read_exactly(), when given a stream that does not contain the amount of data
requested, will loop endlessly, allocating more and more memory as it does, until
it fails with an exception (at which point it will release the memory).
Fix by returning an empty result, like input_stream::read_exactly() (which it
replaces). Add a test case that fails without a fix.
Affected callers are the native transport, commitlog replay, and internal
deserialization.
Fixes #4233 .
Branches: master, branch-3.0
Tests: unit(dev)
Message-Id: <20190216150825.14841-1-avi@scylladb.com >
2019-02-16 17:06:19 +00:00
..
2018-10-02 18:48:23 +01:00
2018-12-10 10:31:08 +02:00
2018-05-09 16:52:26 +01:00
2018-05-30 12:18:56 +02:00
2018-12-24 09:58:08 +02:00
2018-12-24 09:58:08 +02:00
2019-01-08 13:16:36 +02:00
2017-11-12 15:51:29 +01:00
2018-11-01 13:16:17 +00:00
2018-11-21 00:01:44 +02:00
2018-05-10 09:47:41 +03:00
2018-04-16 21:11:13 +02:00
2018-04-16 21:11:13 +02:00
2018-07-11 16:55:20 +02:00
2018-11-26 13:30:21 +00:00
2018-12-03 14:36:08 +01:00
2019-01-08 13:16:36 +02:00
2019-01-08 13:16:36 +02:00
2019-01-08 13:16:36 +02:00
2018-05-30 14:41:40 +02:00
2018-12-03 14:36:08 +01:00
2019-01-08 13:16:36 +02:00
2017-04-17 23:03:15 +03:00
2017-05-17 12:30:03 +03:00
2018-04-07 14:52:58 +03:00
2018-04-07 14:52:58 +03:00
2018-11-21 00:01:44 +02:00
2019-01-08 13:16:36 +02:00
2019-02-07 18:31:25 +02:00
2019-01-08 13:16:36 +02:00
2018-11-21 00:01:44 +02:00
2018-11-21 00:01:44 +02:00
2018-11-01 13:16:17 +00:00
2018-07-18 12:28:06 +01:00
2019-02-16 17:06:19 +00:00
2018-11-21 00:01:44 +02:00
2018-11-21 00:01:44 +02:00
2018-11-01 13:16:17 +00:00
2018-05-10 09:47:41 +03:00
2017-12-05 14:28:34 +00:00
2019-01-08 13:16:36 +02:00
2019-01-08 13:16:36 +02:00
2018-04-10 10:25:06 +03:00
2018-05-15 11:22:21 -04:00
2018-04-16 20:56:30 +02:00
2018-04-16 20:56:30 +02:00
2018-08-30 20:56:44 -04:00
2019-01-08 13:16:36 +02:00
2017-09-18 12:44:05 +02:00
2019-01-21 20:19:20 +02:00
2019-01-08 13:16:36 +02:00
2018-01-30 18:33:25 +01:00
2019-01-18 13:48:05 +00:00
2018-09-03 17:09:54 +03:00
2018-11-21 14:04:27 +01:00
2018-05-31 10:09:01 +01:00
2019-01-08 13:16:36 +02:00
2018-07-11 10:15:01 +01:00
2018-07-20 13:50:17 -07:00
2018-11-20 16:15:12 +00:00
2018-06-27 12:48:30 +02:00
2019-01-08 13:16:36 +02:00
2018-11-21 00:01:44 +02:00
2018-09-30 11:12:23 +03:00
2018-12-12 09:32:05 +00:00
2018-11-21 00:01:44 +02:00
2017-10-18 08:49:52 +02:00
2019-01-18 17:49:46 +02:00
2017-06-29 02:08:12 -03:00
2018-12-28 16:31:24 +01:00
2018-12-05 21:51:01 +02:00
2018-12-05 21:51:01 +02:00
2018-11-21 00:01:44 +02:00
2018-11-21 00:01:44 +02:00
2017-04-25 11:43:04 +02:00