Jeff Epler 5baaac55ce vstr_init_len: Don't crash if (size_t)-1 is passed
In this unusual case, (len + 1) is zero, the allocation in vstr_init
succeeds (allocating 1 byte), and then the caller is likely to erroneously
access outside the allocated region, for instance with a memset().

This could be triggered with os.urandom(-1) after it was converted to use
mp_obj_new_bytes_of_zeros.
2020-01-08 09:42:44 -06:00
..
2018-07-12 14:13:51 -04:00
2018-07-12 14:13:51 -04:00
2018-07-12 14:13:51 -04:00
2018-07-12 14:13:51 -04:00
2018-08-09 13:29:30 -07:00
2019-12-10 21:04:46 -05:00
2019-12-10 21:04:46 -05:00
2018-08-16 17:41:35 -07:00
2018-07-28 13:29:47 -04:00
2018-08-09 13:29:30 -07:00
2019-04-05 21:38:32 +02:00
2018-07-11 16:45:30 -04:00
2018-07-11 16:45:30 -04:00
2018-10-18 10:37:42 -07:00
2019-04-05 21:41:40 +02:00
2018-10-07 19:37:49 +02:00
2018-11-13 22:04:44 +01:00
2017-07-18 11:57:39 +10:00
2018-07-12 14:13:51 -04:00
2019-12-13 14:29:15 -05:00
2019-12-13 14:29:15 -05:00
2019-12-13 14:29:15 -05:00
2019-01-18 11:53:09 -08:00
2020-01-02 18:03:18 -05:00
2019-01-14 18:09:02 -08:00
2019-11-05 17:49:47 -08:00
2020-01-02 18:03:18 -05:00
2019-04-05 21:40:28 +02:00
2020-01-02 18:03:18 -05:00
2019-12-13 14:29:15 -05:00
2020-01-02 18:03:18 -05:00
2020-01-02 18:03:18 -05:00
2020-01-02 18:03:18 -05:00
2019-12-13 14:29:15 -05:00
2019-12-13 14:29:15 -05:00
2019-12-13 14:29:15 -05:00
2018-08-09 13:29:30 -07:00
2019-12-05 13:06:10 -06:00
2018-08-07 14:58:57 -07:00
2018-05-14 17:41:17 -04:00
2018-05-14 17:41:17 -04:00
2019-10-21 18:57:03 -07:00
2018-07-11 16:45:30 -04:00
2019-11-20 14:02:15 -08:00
2018-07-11 16:45:30 -04:00
2019-12-13 14:29:15 -05:00