Skip to content

Crash or error in SUBSTRING()'s regexp parser with UTF-8 encoding #7434

@AlexeyMochalov

Description

@AlexeyMochalov

Hello,

There are an error in SUBSTRING() function regexp escape symbols parser. If we connect to server with multi-byte character encoding, substring() could cause crash or return wrong "Invalid SIMILAR TO pattern" error. It happens because of wrongly calculated pointer to the end of the regexp pattern string.

Could be reproduced with this query. The connection encoding should be UTF-8 or similar multi-byte. Server will possibly crash at once or in a few requests.

Bug related only to FB 3.

PR with fix will be provided in a few moments.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions