[vlc-devel] commit: fb: do not segfault when OpenDisplay() fails in Create(). ( Jean-Paul Saman )
rdenis at simphalempin.com
Tue Feb 17 14:36:45 CET 2009
On Tue, 17 Feb 2009 12:42:14 +0100 (CET), git at videolan.org (git version
> vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed Feb
> 11 17:05:32 2009 +0100| [94fb5c71c977c60204a0aa38c9271b0ff7b8b01e] |
> committer: Jean-Paul Saman
> fb: do not segfault when OpenDisplay() fails in Create().
> When the plugin fails to open the framebuffer, then the mmap might
> not have been done yet. In this case a segmentation fault will occur
> when memset is called on p_sys->p_video. (p_sys->p_video is either NULL,
> or MMAP_FAILED.)
IMHO, it would be cleaner to preset p_video to MAP_FAILED, as memset() is
in principle not defined for pointers.
More information about the vlc-devel