[Bug 243283] graphics/libdrm: update to 2.4.100
| Newsgroups | gmane.os.freebsd.devel.x11 |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243283 --- Comment #2 from Jan Beich <[email protected]> --- Comment on attachment 210648 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=210648 libdrm2.4.100 Alternative version: https://github.com/myfreeweb/freebsd-ports-dank/commit/90125516c6c7 > -PORTEPOCH= 1 > +PORTEPOCH= 2 Why? > #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) [...] > #else > - struct stat sbuf; > - char buf[PATH_MAX + 1]; > + stat_t sbuf; > + char buf[DRM_NODE_NAME_MAX]; > const char *dev_name = drmGetDeviceName(type); > unsigned int maj, min; > int n; > > + if (!dev_name) > + return NULL; > + > if (fstat(fd, &sbuf)) > return NULL; > > maj = major(sbuf.st_rdev); > min = minor(sbuf.st_rdev); > > if (!drmNodeIsDRM(maj, min) || !S_ISCHR(sbuf.st_mode)) > return NULL; > > if (!dev_name) > return NULL; Looks bogus: - POSIX fstat() writes |struct stat| into the 2nd argument - dev_name is already tested against NULL a few lines later - buf[DRM_NODE_NAME_MAX] maybe too small to fit dev_name + DRM_DIR_NAME -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-x11 To unsubscribe, send any mail to "[email protected]"