提交 a0c2fa9b 编写于 作者: H Heikki Linnakangas

isdigit() needs an unsigned char argument.

Per the C standard, the routine should be passed an int, with a value that's
representable as an unsigned char or EOF. Passing a signed char is wrong,
because a negative value is not representable as an unsigned char.
Unfortunately no compiler warns about that.
上级 94ae6ba7
......@@ -511,7 +511,7 @@ parse_sane_timezone(struct pg_tm *tm, text *zone)
* as invalid, it's enough to disallow having a digit in the first
* position of our input string.
*/
if (isdigit(*tzname))
if (isdigit((unsigned char) *tzname))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid input syntax for numeric time zone: \"%s\"",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册