[AD] [ alleg-Patches-3556660 ] Fix segfault triggered by fbcon driver in graphics.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: SourceForge.net <noreply@xxxxxxxxxx>
- Subject: [AD] [ alleg-Patches-3556660 ] Fix segfault triggered by fbcon driver in graphics.c
- From: SourceForge.net <noreply@xxxxxxxxxx>
- Date: Sun, 12 Aug 2012 06:02:48 -0700
Patches item #3556660, was opened at 2012-08-12 06:02
Message generated for change (Tracker Item Submitted) made by tobi_v
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305665&aid=3556660&group_id=5665
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Unix (X) or Linux
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Tobi Vollebregt (tobi_v)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix segfault triggered by fbcon driver in graphics.c
Initial Comment:
I'm trying to use Allegro 4.4 on an embedded platform (ea3250 development board), using the Linux console and fbcon subsystems.
After applying the hack from #3556659, I got a segmentation fault in graphics.c line 660. This line (and the two below it) access the screen pointer using bmp_read_line, bmp_write_line and bmp_unwrite_line. When setting a GFX_FBCON graphics mode, apparently the fbcon driver calls _set_gfx_mode when gfx_driver != NULL and screen == NULL at some point, thus causing a segmentation fault.
The attached patch (applies to 4.4 branch) fixes this by checking if screen != NULL before calling bmp_read_line et. al..
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305665&aid=3556660&group_id=5665