adso icon indicating copy to clipboard operation
adso copied to clipboard

Array bounds wrong for compiled database

Open martinellison opened this issue 11 years ago • 0 comments

There are several arrays that are indexed out of range. in database/db1.h:

        const char * character_index[6862][2];
        const char * utf8s_index[6862][2];
        const char * utf8c_index[6862][2];

in database/indexes.dat: character_index[6862][0] = "@"; .... utf8s_index[6862][0] = "@"; .... utf8c_index[6931][0] = "6862"; utf8c_index[6931][1] = "粮"; utf8c_index[6932][0] = "@";

Also, a minor issue, adsointerface.cpp sets #define USE_MYSQL 1 even if the compiled database is being used. This does not seem to affect the code, though.

Note: this applies to the compiled database.

martinellison avatar Mar 03 '15 07:03 martinellison