lib/i18n_module: Fix out of bounds bug.
authorzrj <rimvydas.jasinskas@gmail.com>
Thu, 26 Apr 2018 11:49:16 +0000 (14:49 +0300)
committerzrj <zrj@dragonflybsd.org>
Thu, 26 Apr 2018 18:41:52 +0000 (21:41 +0300)
Taken-from: NetBSD

lib/i18n_module/VIQR/citrus_viqr.c

index 0d51e29..a78e5a9 100644 (file)
@@ -457,7 +457,7 @@ _citrus_VIQR_encoding_module_init(_VIQREncodingInfo * __restrict ei,
                        return (errnum);
                }
        }
-       for (i = 0;; ++i) {
+       for (i = 0; i < mnemonic_ext_size; ++i) {
                p = &mnemonic_ext[i];
                n = strlen(p->name);
                if (ei->mb_cur_max < n)