Gustavo A. R. Silva
756d5282bf
rtc: s5m: Remove VLA usage
...
In preparation to enabling -Wvla, remove VLAs and replace them
with fixed-length arrays instead.
>From a security viewpoint, the use of Variable Length Arrays can be
a vector for stack overflow attacks. Also, in general, as the code
evolves it is easy to lose track of how big a VLA can get. Thus, we
can end up having segfaults that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-03-17 14:20:57 +01:00
..
2018-03-17 14:20:55 +01:00
2015-04-17 09:04:02 -04:00
2018-03-17 14:20:55 +01:00
2018-03-17 14:20:52 +01:00
2018-03-17 14:20:51 +01:00
2018-03-01 10:49:15 +01:00
2015-09-05 13:19:05 +02:00
2018-03-01 10:49:41 +01:00
2018-03-01 10:49:41 +01:00
2018-03-02 10:09:59 +01:00
2018-03-02 10:12:23 +01:00
2018-03-17 14:20:50 +01:00
2017-10-25 23:05:52 +02:00
2016-03-14 17:08:25 +01:00
2016-10-19 08:45:48 +02:00
2017-11-10 16:24:32 +01:00
2016-07-26 00:09:18 +02:00
2018-03-02 10:09:58 +01:00
2017-01-11 17:23:06 +01:00
2018-03-17 14:20:56 +01:00
2018-03-17 14:20:51 +01:00
2018-03-01 10:49:39 +01:00
2018-03-01 10:49:41 +01:00
2018-03-01 10:49:15 +01:00
2018-03-02 10:09:59 +01:00
2018-03-17 14:20:53 +01:00
2018-03-02 10:11:02 +01:00
2018-03-02 10:11:02 +01:00
2018-03-02 10:11:02 +01:00
2016-09-02 01:24:06 +02:00
2018-02-11 14:34:03 -08:00
2016-09-02 01:24:06 +02:00
2017-08-15 08:06:14 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2017-05-04 14:46:25 +02:00
2018-03-02 10:09:58 +01:00
2018-03-01 10:49:38 +01:00
2018-03-01 10:49:39 +01:00
2017-09-01 01:10:11 +02:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2017-11-02 11:10:55 +01:00
2018-03-02 10:09:58 +01:00
2017-09-01 01:10:11 +02:00
2016-05-20 12:33:51 +02:00
2018-03-02 10:09:58 +01:00
2017-07-06 22:37:15 +02:00
2016-06-04 00:23:35 +02:00
2018-02-13 21:46:04 +01:00
2017-04-22 17:56:18 +02:00
2016-07-19 18:18:06 +02:00
2017-06-20 12:19:14 +02:00
2018-03-17 14:20:54 +01:00
2018-03-02 10:12:19 +01:00
2018-03-17 14:20:51 +01:00
2018-03-01 10:49:41 +01:00
2018-03-17 14:20:50 +01:00
2018-03-02 10:09:58 +01:00
2018-03-01 10:49:41 +01:00
2018-03-01 10:49:41 +01:00
2018-03-17 14:20:48 +01:00
2018-03-02 10:12:19 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-17 14:20:46 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2017-07-31 00:17:48 +02:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:12:20 +01:00
2018-03-01 10:49:41 +01:00
2016-06-26 01:20:08 +02:00
2018-03-17 14:20:56 +01:00
2015-09-05 19:37:22 +02:00
2018-03-01 10:49:41 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2016-09-02 01:24:06 +02:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-01 10:49:36 +01:00
2017-08-24 16:23:16 +02:00
2018-03-02 10:12:17 +01:00
2018-03-02 10:12:21 +01:00
2018-01-27 21:15:59 +11:00
2016-09-02 01:24:06 +02:00
2018-03-01 10:49:41 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2017-11-09 01:16:36 +01:00
2015-09-05 13:19:06 +02:00
2018-03-02 10:09:58 +01:00
2018-03-17 14:20:47 +01:00
2018-03-17 14:20:49 +01:00
2018-03-02 10:09:58 +01:00
2017-10-12 16:30:30 +02:00
2018-03-17 14:20:52 +01:00
2016-01-11 20:19:55 +01:00
2018-03-01 10:49:41 +01:00
2017-08-22 12:05:21 +02:00
2017-08-24 11:03:34 +02:00
2018-03-02 10:12:18 +01:00
2018-03-02 10:09:58 +01:00
2016-07-19 18:15:21 +02:00
2018-03-17 14:20:42 +01:00
2018-03-02 10:09:58 +01:00
2016-05-20 12:33:51 +02:00
2018-03-01 10:49:40 +01:00
2018-03-17 14:20:45 +01:00
2017-09-05 09:55:02 +02:00
2017-10-12 16:24:19 +02:00
2018-03-01 10:49:23 +01:00
2018-03-02 10:12:24 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:12:24 +01:00
2018-03-02 10:09:58 +01:00
2018-03-17 14:20:57 +01:00
2018-03-17 14:20:44 +01:00
2017-08-24 11:03:35 +02:00
2017-11-02 11:10:55 +01:00
2018-03-02 10:12:18 +01:00
2018-03-02 10:09:58 +01:00
2018-03-01 10:49:27 +01:00
2017-05-05 00:43:50 +02:00
2018-03-02 10:12:21 +01:00
2017-07-09 22:32:18 +02:00
2018-03-01 10:49:41 +01:00
2018-03-01 10:49:40 +01:00
2017-11-29 22:20:56 +01:00
2016-09-02 01:24:06 +02:00
2016-11-04 23:31:33 +01:00
2018-03-02 10:09:58 +01:00
2018-03-02 10:09:58 +01:00
2018-03-17 14:20:54 +01:00
2018-03-02 10:12:22 +01:00
2018-03-01 10:49:41 +01:00
2017-01-10 01:32:51 +01:00
2016-03-14 17:08:24 +01:00
2017-09-04 14:41:02 +01:00
2018-03-01 10:49:41 +01:00
2016-07-09 10:24:21 +02:00
2017-08-24 11:03:36 +02:00
2015-09-05 19:37:22 +02:00
2018-03-01 10:49:41 +01:00
2017-03-16 22:59:54 +01:00
2016-05-20 12:33:51 +02:00
2018-03-01 10:49:41 +01:00
2018-03-01 10:49:41 +01:00
2017-10-30 15:03:24 -07:00