Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 620470 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +13 lines)
Line  Link Here
0
-- a/zipinfo.c
0
++ b/zipinfo.c
Lines 1921-1927 Link Here
1921
        ush  dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3);
1921
        ush  dnum=(ush)((G.crec.general_purpose_bit_flag>>1) & 3);
1922
        methbuf[3] = dtype[dnum];
1922
        methbuf[3] = dtype[dnum];
1923
    } else if (methnum >= NUM_METHODS) {   /* unknown */
1923
    } else if (methnum >= NUM_METHODS) {   /* unknown */
1924
        sprintf(&methbuf[1], "%03u", G.crec.compression_method);
1924
        /* 2016-12-05 SMS.
1925
         * https://launchpad.net/bugs/1643750
1926
         * Unexpectedly large compression methods overflow
1927
         * &methbuf[].  Use the old, three-digit decimal format
1928
         * for values which fit.  Otherwise, sacrifice the "u",
1929
         * and use four-digit hexadecimal.
1930
         */
1931
        if (G.crec.compression_method <= 999) {
1932
            sprintf( &methbuf[ 1], "%03u", G.crec.compression_method);
1933
        } else {
1934
            sprintf( &methbuf[ 0], "%04X", G.crec.compression_method);
1935
        }
1925
    }
1936
    }
1926
1937
1927
    for (k = 0;  k < 15;  ++k)
1938
    for (k = 0;  k < 15;  ++k)

Return to bug 620470