xfree86: ddc: safety check for NULL pointer
Even though it *should* never be actually hit, it's still safer to check for NULL instead of letting us crash with segfault. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
c0d068229b
commit
567898f17d
|
@ -45,6 +45,9 @@ find_start(unsigned int *ptr)
|
|||
unsigned int comp[9], test[9];
|
||||
int i, j;
|
||||
|
||||
if (!ptr)
|
||||
return -1;
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
comp[i] = *(ptr++);
|
||||
test[i] = 1;
|
||||
|
|
Loading…
Reference in New Issue