dm: use strnlen to replace strlen

Tracked-On: #2133
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Shuo A Liu
2018-12-25 10:33:36 +08:00
committed by wenlingz
parent 3e0b06cfd6
commit b3ad44d4c1
14 changed files with 27 additions and 25 deletions

View File

@@ -165,8 +165,8 @@ usage(int code)
" --intr_monitor: enable interrupt storm monitor\n"
" --vtpm2: Virtual TPM2 args: sock_path=$PATH_OF_SWTPM_SOCKET\n"
"............its params: threshold/s,probe-period(s),delay_time(ms),delay_duration(ms)\n",
progname, (int)strlen(progname), "", (int)strlen(progname), "",
(int)strlen(progname), "");
progname, (int)strnlen(progname, PATH_MAX), "", (int)strnlen(progname, PATH_MAX), "",
(int)strnlen(progname, PATH_MAX), "");
exit(code);
}