Showing error 1651

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/video/fbmon.c
Line in file: 963
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

 933        DPRINTK("   EDID Version %d.%d\n", (int) specs->version,
 934               (int) specs->revision);
 935
 936        parse_vendor_block(edid + ID_MANUFACTURER_NAME, specs);
 937
 938        block = edid + DETAILED_TIMING_DESCRIPTIONS_START;
 939        for (i = 0; i < 4; i++, block += DETAILED_TIMING_DESCRIPTION_SIZE) {
 940                if (edid_is_serial_block(block)) {
 941                        copy_string(block, specs->serial_no);
 942                        DPRINTK("   Serial Number: %s\n", specs->serial_no);
 943                } else if (edid_is_ascii_block(block)) {
 944                        copy_string(block, specs->ascii);
 945                        DPRINTK("   ASCII Block: %s\n", specs->ascii);
 946                } else if (edid_is_monitor_block(block)) {
 947                        copy_string(block, specs->monitor);
 948                        DPRINTK("   Monitor Name: %s\n", specs->monitor);
 949                }
 950        }
 951
 952        DPRINTK("   Display Characteristics:\n");
 953        get_monspecs(edid, specs);
 954
 955        specs->modedb = fb_create_modedb(edid, &specs->modedb_len);
 956
 957        /*
 958         * Workaround for buggy EDIDs that sets that the first
 959         * detailed timing is preferred but has not detailed
 960         * timing specified
 961         */
 962        for (i = 0; i < specs->modedb_len; i++) {
 963                if (specs->modedb[i].flag & FB_MODE_IS_DETAILED) {
 964                        found = 1;
 965                        break;
 966                }
 967        }
 968
 969        if (!found)
 970                specs->misc &= ~FB_MISC_1ST_DETAIL;
 971
 972        DPRINTK("========================================\n");
 973}
Show full sources