Modify endogenous issue defects

Signed-off-by: xdmal <maxiaodong16@huawei.com>
This commit is contained in:
xdmal
2022-03-14 15:49:24 +08:00
parent 34f9233e13
commit 285599adaa
2 changed files with 18 additions and 19 deletions
+2 -2
View File
@@ -85,7 +85,7 @@ namespace OHOS::Js_sys_module::Process {
close(stdOutFd_[0]);
dup2(stdOutFd_[1], 1);
dup2(stdErrFd_[1], 2); // 2:The value of parameter
if (execl("/bin/sh", "sh", "-c", strCommnd.c_str(), NULL) == -1) {
if (execl("/bin/sh", "sh", "-c", strCommnd.c_str(), nullptr) == -1) {
HILOG_ERROR("execl command failed");
exit(127); // 127:The parameter value
}
@@ -393,7 +393,7 @@ namespace OHOS::Js_sys_module::Process {
case 2: // 2:The parameter value
status = napi_get_value_int64(env_, property, &optionsInfo_->maxBuffer);
if (status != napi_ok) {
optionsInfo_->maxBuffer = MAXSIZE * MAXSIZE;
optionsInfo_->maxBuffer = static_cast<int64_t>(MAXSIZE) * static_cast<int64_t>(MAXSIZE);
}
break;
default: