Christophe Leroy
c959988118
powerpc/64: Fix strncpy() related build failures with GCC 8.1
...
GCC 8.1 warns about possible string truncation:
arch/powerpc/kernel/nvram_64.c:1042:2: error: 'strncpy' specified
bound 12 equals destination size [-Werror=stringop-truncation]
strncpy(new_part->header.name, name, 12);
arch/powerpc/platforms/ps3/repository.c:106:2: error: 'strncpy'
output truncated before terminating nul copying 8 bytes from a
string of the same length [-Werror=stringop-truncation]
strncpy((char *)&n, text, 8);
Fix it by using memcpy(). To make that safe we need to ensure the
destination is pre-zeroed. Use kzalloc() in the nvram code and
initialise the u64 to zero in the ps3 code.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
[mpe: Use kzalloc() in the nvram code, flesh out change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-06-03 20:40:24 +10:00
..
2018-05-03 22:32:29 +10:00
2018-06-01 23:08:06 +10:00
2017-12-04 15:01:09 +11:00
2017-10-25 12:42:35 +02:00
2018-05-03 22:32:25 +10:00
2017-11-02 11:10:55 +01:00
2018-05-25 12:04:44 +10:00
2017-08-23 22:27:04 +10:00
2017-11-02 11:10:55 +01:00
2017-11-02 11:10:55 +01:00
2018-03-24 00:38:51 +11:00
2018-03-24 00:38:51 +11:00
2018-05-18 16:05:15 +10:00
2018-04-01 00:47:50 +11:00
2016-12-24 11:46:01 -08:00
2018-03-30 23:34:23 +11:00
2017-04-13 23:34:33 +10:00
2018-01-10 16:41:14 +01:00
2018-01-15 09:35:39 +01:00
2018-01-15 09:35:26 +01:00
2018-05-18 16:05:15 +10:00
2018-03-27 23:44:58 +11:00
2017-09-21 14:56:00 +10:00
2018-04-01 00:47:45 +11:00
2018-03-27 23:44:58 +11:00
2018-04-19 13:02:38 +10:00
2018-01-27 20:02:52 +11:00
2018-03-27 23:45:19 +11:00
2018-01-16 23:47:12 +11:00
2018-04-01 00:47:49 +11:00
2016-08-07 23:50:09 -04:00
2018-02-08 23:56:10 +11:00
2018-04-01 00:47:49 +11:00
2018-05-03 23:19:30 +10:00
2016-10-14 14:26:58 -07:00
2017-11-02 11:10:55 +01:00
2018-05-25 00:08:26 +10:00
2017-11-13 22:12:48 +11:00
2016-08-07 23:50:09 -04:00
2016-08-07 23:50:09 -04:00
2018-03-30 23:34:23 +11:00
2017-11-02 11:10:55 +01:00
2016-08-07 23:50:09 -04:00
2018-05-21 14:47:44 +10:00
2018-01-19 22:37:01 +11:00
2018-04-19 16:22:20 +10:00
2015-06-02 21:37:19 -05:00
2018-01-19 22:37:01 +11:00
2016-12-20 09:48:44 -08:00
2017-08-23 22:27:04 +10:00
2018-04-05 14:59:26 +10:00
2017-09-01 16:42:54 +10:00
2018-05-25 12:04:43 +10:00
2017-08-23 22:27:04 +10:00
2015-08-03 11:34:12 +02:00
2018-04-13 17:10:28 -07:00
2017-08-10 23:32:12 +10:00
2017-11-12 23:51:41 +11:00
2018-03-31 00:10:33 +11:00
2018-05-17 14:12:40 +10:00
2017-08-15 21:04:32 +10:00
2017-11-02 11:10:55 +01:00
2018-05-10 23:25:08 +10:00
2018-04-13 17:10:27 -07:00
2018-05-03 22:32:27 +10:00
2018-04-07 12:08:19 -07:00
2018-04-24 13:54:51 +10:00
2018-02-02 10:01:04 -08:00
2017-06-02 19:20:43 +10:00
2018-03-20 16:47:53 +11:00
2018-05-18 00:09:06 +10:00
2018-05-25 12:04:38 +10:00
2018-05-28 18:46:34 +10:00
2016-12-24 11:46:01 -08:00
2017-12-11 13:03:35 +11:00
2015-06-02 11:47:45 +10:00
2018-06-03 20:40:24 +10:00
2017-08-23 22:27:04 +10:00
2018-01-19 22:37:01 +11:00
2017-11-12 23:51:41 +11:00
2018-03-31 09:09:36 +11:00
2018-05-25 12:04:46 +10:00
2018-05-10 23:25:12 +10:00
2017-12-11 13:03:35 +11:00
2018-02-06 09:59:40 -08:00
2018-02-28 16:18:53 -06:00
2017-12-18 23:05:52 -06:00
2018-05-18 00:09:06 +10:00
2018-01-22 05:48:33 +11:00
2018-05-24 16:03:24 +10:00
2018-04-04 16:59:50 +10:00
2018-06-02 01:48:11 +10:00
2017-11-02 11:10:55 +01:00
2018-05-11 23:29:04 +10:00
2016-12-24 11:46:01 -08:00
2018-05-21 14:48:01 +10:00
2017-08-31 14:26:47 +10:00
2018-01-22 05:48:33 +11:00
2017-08-31 14:26:40 +10:00
2018-05-18 21:55:01 +10:00
2017-11-02 11:10:55 +01:00
2018-05-10 23:25:14 +10:00
2018-02-11 14:34:03 -08:00
2018-04-03 21:50:08 +10:00
2018-03-13 15:50:42 +11:00
2018-05-03 22:32:26 +10:00
2018-05-25 12:04:43 +10:00
2018-05-25 12:04:43 +10:00
2018-05-10 23:25:13 +10:00
2018-05-10 23:25:13 +10:00
2018-01-31 13:02:18 -08:00
2018-05-10 23:25:13 +10:00
2017-11-02 11:10:55 +01:00
2018-05-03 22:32:27 +10:00
2018-05-29 11:10:39 +10:00
2014-10-09 22:26:04 -04:00
2017-11-02 11:10:55 +01:00
2017-03-02 08:42:30 +01:00
2017-08-10 22:29:41 +10:00
2017-11-02 11:10:55 +01:00
2017-03-20 19:02:49 +11:00
2018-05-10 23:25:15 +10:00
2018-04-03 14:08:58 -07:00
2018-03-31 09:09:36 +11:00
2018-05-10 23:25:14 +10:00
2018-05-10 23:25:16 +10:00
2018-05-10 23:25:14 +10:00
2018-05-25 12:04:44 +10:00
2018-04-03 21:50:07 +10:00
2018-05-24 16:04:02 +10:00
2018-04-10 11:23:23 +10:00
2014-11-12 13:47:20 +11:00
2015-04-07 17:15:13 +10:00
2017-08-24 16:19:21 +10:00
2018-03-24 00:36:45 +11:00
2018-05-25 12:04:46 +10:00
2017-11-02 11:10:55 +01:00
2018-02-02 10:01:04 -08:00
2018-05-10 23:25:11 +10:00