Skip to content

Commit

Permalink
nvbios: check for bios->conn.entries array before using it
Browse files Browse the repository at this point in the history
encountered on the second vbios on a GTX 690
  • Loading branch information
karolherbst committed Jun 6, 2016
1 parent f96a739 commit 1e29dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvbios/dcb.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ void envy_bios_print_dcb (struct envy_bios *bios, FILE *out, unsigned mask) {
} }
if (entry->unk00_4) if (entry->unk00_4)
fprintf(out, " unk00_4 %d", entry->unk00_4); fprintf(out, " unk00_4 %d", entry->unk00_4);
if (dcb->version >= 0x30) if (dcb->version >= 0x30 && bios->conn.entries)
fprintf(out, " CONN %d [0x%02x]", entry->conn, bios->conn.entries[entry->conn].type); fprintf(out, " CONN %d [0x%02x]", entry->conn, bios->conn.entries[entry->conn].type);
else if (entry->unk01_4) else if (entry->unk01_4)
fprintf(out, " unk01_4 %d", entry->unk01_4); fprintf(out, " unk01_4 %d", entry->unk01_4);
Expand Down

0 comments on commit 1e29dc8

Please sign in to comment.