nginx/nginx

Potential null dereference in ngx_time.c

Geschlossen

#169 geöffnet am 12.09.2024

 (3 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C (7.903 Forks)batch import
Complexity - hardbuggood first issue

Repository-Metriken

Stars
 (30.331 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 27T 8h) (17 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide