Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
junhui93
Routing
提交
73b84ed6
R
Routing
项目概览
junhui93
/
Routing
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Routing
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
73b84ed6
编写于
5月 17, 2014
作者:
S
Saverio Proto
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
olsrd: security fixes for olsrd plugins
上级
98b20ec4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
64 addition
and
0 deletion
+64
-0
olsrd/patches/001-hotfix-long-http-headers-txtinfo.patch
olsrd/patches/001-hotfix-long-http-headers-txtinfo.patch
+36
-0
olsrd/patches/002-hotfix-long-http-headers-json.patch
olsrd/patches/002-hotfix-long-http-headers-json.patch
+28
-0
未找到文件。
olsrd/patches/001-hotfix-long-http-headers-txtinfo.patch
0 → 100644
浏览文件 @
73b84ed6
commit d68c96cf53f188030452aadec466aa6389e81511
Author: Henning Rogge <hrogge@gmail.com>
Date: Tue May 13 21:23:36 2014 +0200
Hotfix for much too long http headers
diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c
index b56545d..2bcce41 100644
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -301,8 +301,15 @@
ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int flags __att
FD_ZERO(&rfds);
FD_SET((unsigned int)ipc_connection, &rfds); /* Win32 needs the cast here */
if (0 <= select(ipc_connection + 1, &rfds, NULL, NULL, &tv)) {
- char requ[128];
- ssize_t s = recv(ipc_connection, (void *)&requ, sizeof(requ), 0); /* Win32 needs the cast here */
+ char requ[1024];
+ ssize_t s = recv(ipc_connection, (void *)&requ, sizeof(requ)-1, 0); /* Win32 needs the cast here */
+
+ if (s == sizeof(requ)-1) {
+ /* input was much too long, just skip the rest */
+ char dummy[1024];
+
+ while (recv(ipc_connection, (void *)&dummy, sizeof(dummy), 0) == sizeof(dummy), 0);
+ }
if (0 < s) {
requ[s] = 0;
/* To print out neighbours only on the Freifunk Status
@@ -329,6 +336,7 @@
ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int flags __att
if (0 != strstr(requ, "/ver")) send_what |= SIW_VERSION;
}
}
+
if ( send_what == 0 ) send_what = SIW_ALL;
}
olsrd/patches/002-hotfix-long-http-headers-json.patch
0 → 100644
浏览文件 @
73b84ed6
commit 528176910ee1d00278e4108cc23d9f4f2de8a639
Author: Alessio Caiazza <nolith@abisso.org>
Date: Wed May 14 22:45:33 2014 +0200
Hotfix for very long http headers also for jsoninfo
diff --git a/lib/jsoninfo/src/olsrd_jsoninfo.c b/lib/jsoninfo/src/olsrd_jsoninfo.c
index 966292c..817c64a 100644
--- a/lib/jsoninfo/src/olsrd_jsoninfo.c
+++ b/lib/jsoninfo/src/olsrd_jsoninfo.c
@@ -508,8 +508,15 @@
ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int flags __att
FD_ZERO(&rfds);
FD_SET((unsigned int)ipc_connection, &rfds); /* Win32 needs the cast here */
if (0 <= select(ipc_connection + 1, &rfds, NULL, NULL, &tv)) {
- char requ[128];
- ssize_t s = recv(ipc_connection, (void *)&requ, sizeof(requ), 0); /* Win32 needs the cast here */
+ char requ[1024];
+ ssize_t s = recv(ipc_connection, (void *)&requ, sizeof(requ)-1, 0); /* Win32 needs the cast here */
+
+ if (s == sizeof(requ)-1) {
+ /* input was too much long, just skip the rest */
+ char dummy[1024];
+
+ while (recv(ipc_connection, (void *)&dummy, sizeof(dummy), 0) == sizeof(dummy), 0);
+ }
if (0 < s) {
requ[s] = 0;
/* print out the requested tables */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录