Just as it is already handled in the caller, `drmGetVersion`.
I'm not sure what the offending driver is, but the Ubuntu incidents
seem to be coming from a dual Intel/Nvidia machine. And they show
it is `card1` so I'm guessing `nvidia-drm` is the offender.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/
2104352
Gbp-Pq: Name xf86drm-Handle-NULL-in-drmCopyVersion.patch
d->version_minor = s->version_minor;
d->version_patchlevel = s->version_patchlevel;
d->name_len = s->name_len;
- d->name = strdup(s->name);
+ d->name = s->name ? strdup(s->name) : NULL;
d->date_len = s->date_len;
- d->date = strdup(s->date);
+ d->date = s->date ? strdup(s->date) : NULL;
d->desc_len = s->desc_len;
- d->desc = strdup(s->desc);
+ d->desc = s->desc ? strdup(s->desc) : NULL;
}