Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8e415d3 authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/bios: check for null script pointers in parser



Allows us to be lazy elsewhere...

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 5024c54b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3771,6 +3771,10 @@ parse_init_table(struct nvbios *bios, uint16_t offset, struct init_exec *iexec)
	int count = 0, i, ret;
	uint8_t id;

	/* catch NULL script pointers */
	if (offset == 0)
		return 0;

	/*
	 * Loop until INIT_DONE causes us to break out of the loop
	 * (or until offset > bios length just in case... )