[Bug 72732] New: Missing NULL check; radeon_drm_winsys.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Priority medium
Bug ID 72732
Assignee dri-devel@lists.freedesktop.org
Summary Missing NULL check; radeon_drm_winsys.c
Severity normal
Classification Unclassified
OS All
Reporter freedesktop@treblig.org
Hardware Other
Status NEW
Version unspecified
Component Drivers/DRI/R600
Product Mesa

I can sometime trigger a seg in do_winsys_init at radeon_drm_winsys.c on my
HD4350

There seems to be a simple missing NULL check:


214    version = drmGetVersion(ws->fd);
215    if (version->version_major != 2 ||
216        version->version_minor < 3) {

All the other users of drmGetVersion do a NULL check, so I suggest adding:

    if (!version) {
      fprintf(stderr,"%s: drmGetVersion NULL - bad fd (%d)?\n", __FUNCTION__,
ws->fd);
      return FALSE;
    }

I believe this to be part of the reason for:
https://bugzilla.redhat.com/show_bug.cgi?id=993463


why drmGetVersion is failing is a different matter (probably a bad fd at that
point - but why?) , but at least the NULL check would stop the seg.

Dave


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux