View | Details | Raw Unified | Return to bug 145159 | Differences between
and this patch

Collapse All | Expand All

(-)libs/threadimageio/thumbnailbasic.cpp (-2 / +2 lines)
Lines 137-143 Link Here
137
    unsigned char buf[PNG_BYTES_TO_CHECK];
137
    unsigned char buf[PNG_BYTES_TO_CHECK];
138
138
139
    size_t itemsRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
139
    size_t itemsRead = fread(buf, 1, PNG_BYTES_TO_CHECK, f);
140
    if (itemsRead != 1 || !png_check_sig(buf, PNG_BYTES_TO_CHECK))
140
    if (itemsRead != 1 || png_sig_cmp(buf, 0, PNG_BYTES_TO_CHECK))
141
    {
141
    {
142
        fclose(f);
142
        fclose(f);
143
        return qimage;
143
        return qimage;
Lines 232-238 Link Here
232
    {
232
    {
233
        png_set_gray_to_rgb(png_ptr);
233
        png_set_gray_to_rgb(png_ptr);
234
        if (png_get_bit_depth(png_ptr, info_ptr) < 8)
234
        if (png_get_bit_depth(png_ptr, info_ptr) < 8)
235
            png_set_gray_1_2_4_to_8(png_ptr);
235
            png_set_expand_gray_1_2_4_to_8(png_ptr);
236
    }
236
    }
237
237
238
    int sizeOfUint = sizeof(unsigned int);
238
    int sizeOfUint = sizeof(unsigned int);

Return to bug 145159