nginx/nginx

Potential null dereference in ngx_time.c

已关闭

#169 创建于 2024年9月12日

 (3 条评论) (0 个反应) (1 位负责人)C (7,903 个派生)batch import
Complexity - hardbuggood first issue

仓库指标

星标
 (30,331 个星标)
PR 合并指标
 (平均合并 27天 8小时) (30 天内合并 17 个 PR)

描述

In results of static analyze of nginx sources I founded potential null dereference

https://github.com/nginx/nginx/blob/00637cce366f17b78fe1ed5c1ef0e534143045f6/src/os/unix/ngx_time.c#L48-L50

localtime() function potentially can return NULL value, which will dereference in strftime(). How about to add check for this case?

贡献者指南