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

Konrad Rosenbaum konrad at silmor.de
Thu Jan 10 08:28:45 CET 2013


Hi,

On Wednesday 09 January 2013 23:48:42 Giuseppe D'Angelo wrote:
> 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:

How about reviewing and accepting one from someone who already accepted the 
Agreement: https://codereview.qt-project.org/#change,39400

It's identical to Thomas' code.


	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130110/a716803f/attachment.sig>


More information about the Interest mailing list