Potential invocation of qsort on uninitialized memory during cookie save
该报告还没有中文解读。
原文摘录
摘自原文(2698 字符中的一小部分)
Summary: If cookiejar is set, cookies are written to file at exit. That is done by the function cookie_output() in cookie.c. The cookies are sorted before being stored, using qsort on a temporary array. That temporary array is uninitialized (gotten from malloc at …
原文中的代码
diff --git a/lib/cookie.c b/lib/cookie.c
index 53ca40237..875569bb0 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -1547,7 +1547,7 @@ static int cookie_output(struct CookieInfo *c, const char *dumphere)
}
}
- qsort(array, c->numcookies, sizeof(struct Cookie *), cookie_sort_ct);
+ …默认不展示报告全文。以上为简短摘录,完整复现过程请阅读原文。版权归研究员与 curl 所有。
时间线
- 报告提交
- 公开披露
阅读 HackerOne 原文 ↗作者 @pauldreik · 版权归作者与 curl 所有