[Interest] [PATCH qtbase] qlinuxfbscreen: fix crash in switchToGraphicsMode()

Giuseppe D'Angelo dangelog at gmail.com
Wed Jan 9 23:48:42 CET 2013


Hi Thomas,

On 9 January 2013 23:32, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
> The switchToGraphicsMode() function calls the KDGETMODE ioctl() call,
> but passes the address of oldMode, which is already a
> pointer. Therefore, the current code makes the kernel write the "mode"
> value returned by the KDGETMODE ioctl() at the address of the oldMode
> pointer. This pointer becomes NULL, which makes the following line
> trigger a segfault.
>
> Since the function already receives as argument the address of
> oldMode, there is no need to do &oldMode when doing the ioctl() call.
>
> This patch fixes the following segfault:

Thanks for the fix, but although it's trifial, for legal reasons the
Qt Project can't accept patches from the mailing list (or the
bugtracker). Please consider spending 5 minutes to set up Gerrit and
pushing this fix:

http://qt-project.org/wiki/Setting-up-Gerrit

Cheers,
-- 
Giuseppe D'Angelo



More information about the Interest mailing list