mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 19:50:25 +03:00
Fix coverity defects: CID 147586
CID 147586: function:allow_usage Type:out-of-bounds read Reviewed-by: Chunwei Chen <david.chen@osnexus.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5364
This commit is contained in:
parent
acc6d0e223
commit
010782be91
@ -4832,9 +4832,9 @@ allow_usage(boolean_t un, boolean_t requested, const char *msg)
|
||||
(void) fprintf(fp, gettext("Usage: %s\n"), get_usage(un ? HELP_UNALLOW :
|
||||
HELP_ALLOW));
|
||||
(void) fprintf(fp, gettext("Options:\n"));
|
||||
for (i = 0; i < (un ? unallow_size : allow_size); i++) {
|
||||
const char *opt = opt_desc[i++];
|
||||
const char *optdsc = opt_desc[i];
|
||||
for (i = 0; i < (un ? unallow_size : allow_size); i += 2) {
|
||||
const char *opt = opt_desc[i];
|
||||
const char *optdsc = opt_desc[i + 1];
|
||||
(void) fprintf(fp, gettext(" %-10s %s\n"), opt, optdsc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user