Jonathan Wakely
789c57bc5f
libstdc++: Fix undefined behaviour in std::string
...
This fixes a ubsan error when constructing a string with a null pointer:
bits/basic_string.h:534:21: runtime error: applying non-zero offset 18446744073709551615 to null pointer
The _M_construct function only cares whether the second pointer is
non-null, so create a non-null value without undefined arithmetic.
We can also pass the random_access_iterator_tag directly to the
_M_construct function, to avoid going via the tag dispatching
_M_construct_aux, because we know we have pointers not integers here.
libstdc++-v3/ChangeLog:
* include/bits/basic_string.h (basic_string(const CharT*, const A&)):
Do not do arithmetic on null pointer.
2021-05-04 22:45:02 +01:00
..
2021-01-04 10:26:59 +01:00
2021-03-10 15:27:41 +00:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-20 15:14:58 +01:00
2021-01-04 10:26:59 +01:00
2021-04-22 17:35:00 +01:00
2021-04-22 07:34:02 -07:00
2021-04-06 16:43:24 +01:00
2021-04-30 14:57:40 +01:00
2021-05-04 22:45:02 +01:00
2021-04-30 14:57:40 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-03-23 15:00:43 +00:00
2021-02-23 09:30:18 +01:00
2021-01-04 10:26:59 +01:00
2021-03-10 15:27:41 +00:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-30 14:57:40 +01:00
2021-03-10 15:27:41 +00:00
2021-03-10 15:27:41 +00:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-09 13:09:23 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-09 13:09:24 +01:00
2021-04-06 16:43:24 +01:00
2021-03-10 15:27:41 +00:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:25 +01:00
2021-01-04 10:26:59 +01:00
2021-03-10 15:27:41 +00:00
2021-01-04 10:26:59 +01:00
2021-03-10 15:27:41 +00:00
2021-04-30 20:30:46 +01:00
2021-03-10 15:27:41 +00:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-05-04 12:07:09 +01:00
2021-01-04 10:26:59 +01:00
2021-03-22 15:56:49 +00:00
2021-04-27 23:21:19 -04:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:25 +01:00
2021-01-04 10:26:59 +01:00
2021-04-30 10:59:20 -04:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-08 21:42:58 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-26 12:30:26 +01:00
2021-04-06 16:43:24 +01:00
2021-04-22 15:49:27 +01:00
2021-04-22 15:49:27 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-28 12:45:49 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-03-10 15:27:41 +00:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-02-09 21:56:27 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-20 09:18:50 -04:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-28 17:56:51 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-30 14:57:40 +01:00
2021-04-06 16:43:24 +01:00
2021-01-04 10:26:59 +01:00
2021-04-06 16:43:24 +01:00
2021-04-09 13:09:23 +01:00
2021-01-04 10:26:59 +01:00
2021-01-27 13:45:52 +00:00
2021-01-04 10:26:59 +01:00
2021-04-20 15:14:58 +01:00
2021-03-10 15:27:41 +00:00
2021-03-10 15:27:41 +00:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-06 16:43:24 +01:00
2021-04-09 13:09:23 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-01-04 10:26:59 +01:00
2021-04-30 14:57:40 +01:00