@@ -255,7 +255,7 @@ mn_decode_word_index (mn_index index, void *dest, int destsize, int *offset)
if (*offset < 0) /* Error from previous call? report it */
return *offset;
- if (index < 0 || index > MN_WORDS) /* Word index out of range */
+ if (index > MN_WORDS) /* Word index out of range */
{
*offset = MN_EINDEX;
@@ -49,6 +49,7 @@
typedef unsigned char mn_byte; /* 8 bit quantity */
typedef unsigned long mn_word32; /* temporary value, at least 32 bits */
+/* Range checks assume that mn_index is unsigned (=> can't be <0). --DV */
typedef unsigned int mn_index; /* index into wordlist */
extern const char *mn_words[]; /* the word list itself */