James Bates 55aa42f2e6 efifb: prevent null-deref when iterating dmi_list
The dmi_list array is initialized using gnu designated initializers, and
therefore may contain fewer explicitly defined entries as there are
elements in it. This is because the enum above with M_xyz constants
contains more items than the designated initializer. Those elements not
explicitly initialized are implicitly set to 0.

Now efifb_setup() loops through all these array elements, and performs
a strcmp on each item. For non explicitly initialized elements this will
be a null pointer:

This patch swaps the check order in the if statement, thus checks first
whether dmi_list[i].base is null.

Signed-off-by: James Bates <james.h.bates@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-10-29 12:41:46 +02:00
..
2013-09-26 11:52:31 +03:00
2013-09-26 11:50:08 +03:00
2013-09-11 19:55:12 -07:00
2013-09-20 12:22:03 +03:00
2013-09-26 11:52:31 +03:00
2013-02-22 23:31:31 -05:00
2013-04-24 08:41:41 +03:00
2013-04-26 08:28:56 +03:00
2013-03-20 16:26:32 +01:00
2013-10-09 12:52:50 +03:00
2013-09-20 12:22:03 +03:00
2013-09-20 12:22:01 +03:00
2013-09-05 09:49:32 -07:00
2013-07-09 15:51:32 -07:00
2013-09-20 12:22:02 +03:00
2013-09-20 12:23:21 +03:00
2013-09-20 12:23:22 +03:00
2013-09-26 11:50:07 +03:00
2013-09-26 11:52:31 +03:00
2013-07-26 10:28:50 +03:00
2013-09-20 12:23:22 +03:00