Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
镜像
Eclipse Foundation
Eclipse Mosquitto
提交
70d713ca
E
Eclipse Mosquitto
项目概览
镜像
/
Eclipse Foundation
/
Eclipse Mosquitto
大约 1 年 前同步成功
通知
36
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Eclipse Mosquitto
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
70d713ca
编写于
6月 14, 2023
作者:
R
Roger A. Light
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix heap overflow when reading corrupt config with "log_dest file".
上级
284db04b
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
4 deletion
+8
-4
ChangeLog.txt
ChangeLog.txt
+1
-0
src/conf.c
src/conf.c
+6
-4
src/handle_connect.c
src/handle_connect.c
+1
-0
未找到文件。
ChangeLog.txt
浏览文件 @
70d713ca
...
@@ -31,6 +31,7 @@ Broker:
...
@@ -31,6 +31,7 @@ Broker:
not a string, when loading the dynsec config from file only.
not a string, when loading the dynsec config from file only.
- Dynsec plugin will not allow duplicate clients/groups/roles when loading
- Dynsec plugin will not allow duplicate clients/groups/roles when loading
config from file, which matches the behaviour for when creating them.
config from file, which matches the behaviour for when creating them.
- Fix heap overflow when reading corrupt config with "log_dest file".
Client library:
Client library:
- Use CLOCK_BOOTTIME when available, to keep track of time. This solves the
- Use CLOCK_BOOTTIME when available, to keep track of time. This solves the
...
...
src/conf.c
浏览文件 @
70d713ca
...
@@ -1533,15 +1533,16 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload,
...
@@ -1533,15 +1533,16 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload,
}
else
if
(
!
strcmp
(
token
,
"dlt"
)){
}
else
if
(
!
strcmp
(
token
,
"dlt"
)){
cr
->
log_dest
|=
MQTT3_LOG_DLT
;
cr
->
log_dest
|=
MQTT3_LOG_DLT
;
}
else
if
(
!
strcmp
(
token
,
"file"
)){
}
else
if
(
!
strcmp
(
token
,
"file"
)){
cr
->
log_dest
|=
MQTT3_LOG_FILE
;
if
(
config
->
log_fptr
||
config
->
log_file
){
if
(
config
->
log_fptr
||
config
->
log_file
){
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Duplicate
\"
log_dest file
\"
value."
);
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Duplicate
\"
log_dest file
\"
value."
);
return
MOSQ_ERR_INVAL
;
return
MOSQ_ERR_INVAL
;
}
}
/* Get remaining string. */
/* Get remaining string. */
token
=
&
token
[
strlen
(
token
)
+
1
];
token
=
saveptr
;
while
(
token
[
0
]
==
' '
||
token
[
0
]
==
'\t'
){
if
(
token
&&
token
[
0
]){
token
++
;
while
(
token
[
0
]
==
' '
||
token
[
0
]
==
'\t'
){
token
++
;
}
}
}
if
(
token
[
0
]){
if
(
token
[
0
]){
config
->
log_file
=
mosquitto__strdup
(
token
);
config
->
log_file
=
mosquitto__strdup
(
token
);
...
@@ -1553,6 +1554,7 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload,
...
@@ -1553,6 +1554,7 @@ static int config__read_file_core(struct mosquitto__config *config, bool reload,
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Empty
\"
log_dest file
\"
value in configuration."
);
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Empty
\"
log_dest file
\"
value in configuration."
);
return
MOSQ_ERR_INVAL
;
return
MOSQ_ERR_INVAL
;
}
}
cr
->
log_dest
|=
MQTT3_LOG_FILE
;
}
else
{
}
else
{
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Invalid log_dest value (%s)."
,
token
);
log__printf
(
NULL
,
MOSQ_LOG_ERR
,
"Error: Invalid log_dest value (%s)."
,
token
);
return
MOSQ_ERR_INVAL
;
return
MOSQ_ERR_INVAL
;
...
...
src/handle_connect.c
浏览文件 @
70d713ca
...
@@ -951,6 +951,7 @@ int handle__connect(struct mosquitto *context)
...
@@ -951,6 +951,7 @@ int handle__connect(struct mosquitto *context)
handle_connect_error:
handle_connect_error:
mosquitto_property_free_all
(
&
properties
);
mosquitto__free
(
auth_data
);
mosquitto__free
(
auth_data
);
mosquitto__free
(
client_id
);
mosquitto__free
(
client_id
);
mosquitto__free
(
username
);
mosquitto__free
(
username
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录