Turo Lamminen
2015-04-30 b7846242bfd3866ad5f540a035590c40f8d5ae95

Also verify calculated size against data size

1 files modified
6 ■■■■■ changed files
mojodds.c 6 ●●●●● patch | view | raw | blame | history
mojodds.c
@@ -349,6 +349,12 @@
        return 0;
    }
    if (calcSize > *len) {
        // there's not enough data to contain the advertised images
        // trying to read mips would fail
        return 0;
    }
    return 1;
} // parse_dds