提交 4d88d3ab 编写于 作者: T Taylor Vesely

Fix segfault with identify_system_timezone()

The return value of tzparse() has changed as of commit b749790a, but a
corresponding change to the tzparse() function in score_timezone() was never
made. As a result, under certain circumstances the server might produce SIGSEGV
while running identify_system_timezone().
Co-Authored-by: NJesse Zhang  <sbjesse@gmail.com>
上级 3d593e45
......@@ -310,7 +310,7 @@ score_timezone(const char *tzname, struct tztry * tt)
*/
if (tzload(tzname, NULL, &tz.state, TRUE) != 0)
{
if (tzname[0] == ':' || tzparse(tzname, &tz.state, FALSE) != 0)
if (tzname[0] == ':' || !tzparse(tzname, &tz.state, FALSE))
{
return -1; /* can't handle the TZ name at all */
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册