Piotr Sarna
43a3719fe4
cql3: fix potential segfault on disengaged optional
...
In untyped_result_set::get_view, there exists a silent assumption
that the underlying data, which is an optional, to always be engaged.
In case the value happens to be disengaged it may lead to creating
an incorrect bytes view from a disengaged optional.
In order to make the code safer (since values parsed by this code
often come from the network and can contain virtually anything)
a segfault is replaced with an exception, by calling optional's
value() function, which throws when called on disengaged optionals.
Fixes #6915
Tests: unit(dev)
Message-Id: <6e9e4ca67e0e17c17b718ab454c3130c867684e2.1595834092.git.sarna@scylladb.com >
2020-07-28 10:06:00 +03:00
..
2020-07-15 12:38:39 +03:00
2020-07-27 09:19:37 +02:00
2020-07-07 23:08:09 +02:00
2020-07-27 09:19:37 +02:00
2020-05-30 09:49:29 +03:00
2020-05-30 09:49:29 +03:00
2020-05-30 09:49:29 +03:00
2020-04-27 12:47:42 +03:00
2020-04-27 12:47:42 +03:00
2018-06-11 15:34:14 +03:00
2020-05-06 13:11:07 +03:00
2020-05-06 13:11:07 +03:00
2020-02-20 18:14:49 +02:00
2020-06-08 11:28:57 +03:00
2020-04-27 12:47:42 +03:00
2020-04-27 12:47:42 +03:00
2020-05-30 09:49:29 +03:00
2020-07-17 17:40:23 +03:00
2020-02-04 10:52:04 +02:00
2019-12-11 10:44:40 -08:00
2019-08-21 19:35:59 +02:00
2020-06-29 12:30:37 +03:00
2020-06-06 21:04:06 +03:00
2019-11-26 02:24:49 +03:00
2018-11-21 00:01:44 +02:00
2020-02-28 08:36:27 -08:00
2020-02-28 08:36:27 -08:00
2020-07-15 13:52:09 +02:00
2020-06-26 09:19:36 -04:00
2020-05-30 09:49:29 +03:00
2020-05-30 09:49:29 +03:00
2020-04-27 12:47:42 +03:00
2020-05-31 23:45:19 +03:00
2020-05-31 23:45:19 +03:00
2020-06-06 21:04:06 +03:00
2019-07-04 10:54:30 +02:00
2020-06-26 09:19:36 -04:00
2018-06-11 15:34:13 +03:00
2020-04-27 12:47:42 +03:00
2020-06-02 09:12:21 +03:00
2020-05-28 09:09:48 +02:00
2020-07-07 11:54:36 +02:00
2020-05-06 19:02:36 +03:00
2020-04-27 12:47:42 +03:00
2018-06-25 09:21:47 +01:00
2020-06-29 12:30:37 +03:00
2020-06-29 12:30:37 +03:00
2019-01-08 13:16:36 +02:00
2020-05-30 09:49:29 +03:00
2020-05-30 09:49:29 +03:00
2020-07-16 12:27:25 +02:00
2020-07-17 17:40:23 +03:00
2020-02-18 16:16:20 +02:00
2020-04-27 12:47:42 +03:00
2020-07-07 23:08:09 +02:00
2020-04-27 12:47:42 +03:00
2020-04-27 12:47:42 +03:00
2020-07-17 17:40:23 +03:00
2020-05-30 09:49:29 +03:00
2020-07-03 10:27:23 +02:00
2020-07-03 10:27:23 +02:00
2020-06-15 15:47:15 -07:00
2020-07-28 10:06:00 +03:00
2019-10-28 21:12:52 +03:00
2020-07-17 17:40:23 +03:00
2020-05-30 09:49:29 +03:00
2020-05-30 09:49:29 +03:00
2019-01-08 13:16:36 +02:00
2019-01-08 13:16:36 +02:00
2020-03-23 23:19:21 +03:00
2019-01-08 13:16:36 +02:00
2020-04-27 12:47:42 +03:00
2020-04-27 12:47:42 +03:00