Buffer overrun in find_uniq_filename

Description

To reproduce this bug compile MariaDB with ASAN:
cmake -DWITH_ASAN=ON -DCMAKE_BUILD_TYPE=Debug -DMYSQL_MAINTAINER_MODE=ON

mtr test following.

find_uniq_filename.test

find_uniq_filename.opt

Originally fixed in WebScaleSQL: https://github.com/webscalesql/webscalesql-5.6/commit/bce9eddc1da87beab17c60d7eb7379841a3d45af.

Environment

None

Assignee

Sergey Vojtovich

Reporter

Sergey Vojtovich

Labels

None

Fix versions

Affects versions

Priority

Major
Configure