Vyacheslav Andrejev points out a heap management goof in the new jump
[u/mdw/putty] / windows / winucs.c
index 2412e40..757a275 100644 (file)
@@ -1088,7 +1088,7 @@ int decode_codepage(char *cp_name)
        if (tolower(d[0]) == 'c' && tolower(d[1]) == 'p')
            d += 2;
        if (tolower(d[0]) == 'i' && tolower(d[1]) == 'b'
-           && tolower(d[1]) == 'm')
+           && tolower(d[2]) == 'm')
            d += 3;
        for (s = d; *s >= '0' && *s <= '9'; s++);
        if (*s == 0 && s != d)