mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-18 09:11:08 +02:00
fixed using raw non-null-terminated strings from config parser in syscalls
This commit is contained in:
parent
b73075e28c
commit
29dfda882a
|
@ -742,7 +742,9 @@ ngx_rtmp_ensure_directory(ngx_rtmp_session_t *s)
|
|||
|
||||
dacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_dash_module);
|
||||
|
||||
if (ngx_file_info(dacf->path.data, &fi) == NGX_FILE_ERROR) {
|
||||
*ngx_snprintf(path, sizeof(path) - 1, "%V", &dacf->path) = 0;
|
||||
|
||||
if (ngx_file_info(path, &fi) == NGX_FILE_ERROR) {
|
||||
|
||||
if (ngx_errno != NGX_ENOENT) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->connection->log, ngx_errno,
|
||||
|
|
|
@ -313,7 +313,9 @@ ngx_rtmp_hls_create_parent_dir(ngx_rtmp_session_t *s)
|
|||
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
|
||||
"hls: creating target folder: '%V'", &hacf->path);
|
||||
|
||||
if (ngx_create_dir(hacf->path.data, NGX_RTMP_HLS_DIR_ACCESS) != NGX_OK) {
|
||||
*ngx_snprintf(path, sizeof(path) - 1, "%V", &hacf->path) = 0;
|
||||
|
||||
if (ngx_create_dir(path, NGX_RTMP_HLS_DIR_ACCESS) != NGX_OK) {
|
||||
err = ngx_errno;
|
||||
if (err != NGX_EEXIST) {
|
||||
ngx_log_error(NGX_LOG_ERR, s->connection->log, err,
|
||||
|
|
Loading…
Reference in a new issue