diff options
author | Kinga Stefaniuk <kinga.stefaniuk@intel.com> | 2024-07-04 14:53:35 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-07-30 15:59:24 +0200 |
commit | 0af8c9ebf50b68ad5f80efad7e94688235544a3d (patch) | |
tree | e0adf1da970ca29b8bbd6bb310a8e38b9a31f8fb /mdadm.h | |
parent | drive_encryption: Fix ata passthrough12 verify (diff) | |
download | mdadm-0af8c9ebf50b68ad5f80efad7e94688235544a3d.tar.xz mdadm-0af8c9ebf50b68ad5f80efad7e94688235544a3d.zip |
super0: use define for char array in examine_super0
Using nb with 11 length may cause format-truncation errors,
because it was possible to use snprintf with 12 length input
and write it to 11 length output. Added new define and use it
to avoid this error.
Signed-off-by: Kinga Stefaniuk <kinga.stefaniuk@intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2021,6 +2021,9 @@ enum r0layout { #define PATH_MAX 4096 #endif +/* The max string length necessary for decimal conversion, cannot be longer than count of bits */ +#define INT_2_DEC_STR_MAX (sizeof(int) * 8) + #define RESYNC_NONE -1 #define RESYNC_DELAYED -2 #define RESYNC_PENDING -3 |