diff options
author | Xiao Ni <xni@redhat.com> | 2024-07-26 09:14:05 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-08-05 11:07:39 +0200 |
commit | 13c1f4a56b3bedbf802d66e86afd787e318e25fb (patch) | |
tree | c687ec7dfe074f46675a3957930fcd85aeacbf74 /Grow.c | |
parent | mdadm/Grow: fix coverity issue RESOURCE_LEAK (diff) | |
download | mdadm-13c1f4a56b3bedbf802d66e86afd787e318e25fb.tar.xz mdadm-13c1f4a56b3bedbf802d66e86afd787e318e25fb.zip |
mdadm/Grow: fix coverity issue STRING_OVERFLOW
Fix string overflow problems in Grow.c
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1694,7 +1694,7 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re) /* Current RAID6 layout has a RAID5 * equivalent - good */ - strcat(strcpy(layout, ls), "-6"); + snprintf(layout, 40, "%s-6", ls); l = map_name(r6layout, layout); if (l == UnSet) return "Cannot find RAID6 layout to convert to"; |