Bugzilla – Bug 152209
tkrat-2.1.5-6: 2 * array subscript out of range
Last modified: 2006-02-20 23:05:06 UTC
I just tried to compile package tkrat-2.1.5-6 with a non standard version of the GNU C compiler. It said 1. ratCode.c:874: warning: array subscript out of range The source code is buf[0] = buf[3]; but unsigned char buf[3]; Suggest make array buf one bigger. 2. ratDbFolder.c:403: warning: array subscript out of range The source code is case 'T': flagArray[RAT_DRAFT] = 1; break; but int flagArray[4] = {0,0,0,0}; and typedef enum { RAT_SEEN, /* Message content has been seen by the user */ RAT_DELETED, /* Message is marked for deletion */ RAT_FLAGGED, /* Message is flagged */ RAT_ANSWERED, /* Message has been answered */ RAT_DRAFT, /* Message is a draft */ RAT_RECENT /* Message is a not seen but has been in the folder for some time */ } RatFlag; so the program is trying to access flagArray[ 4]. Suggest code rework.
Fixed for 10.1.