[MDEV-13604] mariadb-10.2.8/storage/mroonga/lib/mrn_path_mapper.cpp: 4 * cart before horse ? Created: 2017-08-21  Updated: 2021-11-09

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Mroonga
Affects Version/s: 10.0, 10.1, 10.2
Fix Version/s: 10.2

Type: Bug Priority: Minor
Reporter: David Binderman Assignee: Kouhei Sutou
Resolution: Unresolved Votes: 0
Labels: cppcheck


 Description   

mariadb-10.2.8/storage/mroonga/lib/mrn_path_mapper.cpp:64]: (style) Array index 'i' is used before limits check.

Source code is

      while (original_mysql_path_[i] != FN_LIBCHAR && i < len) {
        db_path_[j++] = original_mysql_path_[i++];

Some duplicates:

mariadb-10.2.8/storage/mroonga/lib/mrn_path_mapper.cpp:94]: (style) Array index 'i' is used before limits check.
mariadb-10.2.8/storage/mroonga/lib/mrn_path_mapper.cpp:127]: (style) Array index 'i' is used before limits check.
mariadb-10.2.8/storage/mroonga/lib/mrn_path_mapper.cpp:139]: (style) Array index 'i' is used before limits check.


Generated at Thu Feb 08 08:06:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.