Hi.

Per Coverity.

Coverity raised the follow report:

CID 1642824: (#1 of 1): Overflowed constant (INTEGER_OVERFLOW)
37. overflow_const: Expression pattern_len - 1ULL, where pattern_len is
known to be equal to 0, underflows the type of pattern_len - 1ULL, which is
type unsigned long long.

This is because the function *pg_mbstrlen* can return zero.
And the comment is clear, *just in case there are MB chars*.

patch attached.

best regards,
Ranier Vilela

Attachment: avoid-overflow-formatting.patch
Description: Binary data

Reply via email to