mirror of
https://github.com/openharmony/js_sys_module.git
synced 2026-07-19 23:13:39 -04:00
Modify endogenous issue defects
Signed-off-by: xdmal <maxiaodong16@huawei.com>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user