xf86drm: ensure proper alignment of pointers in drmProcessPciDevice
Previously, (*device)->businfo.pci would end up misaligned, which results in undefined behavior. Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>main
parent
70b64073f7
commit
9bdec97a19
|
@ -3000,7 +3000,7 @@ static int drmProcessPciDevice(drmDevicePtr *device, const char *d_name,
|
|||
const char *node, int node_type,
|
||||
int maj, int min, bool fetch_deviceinfo)
|
||||
{
|
||||
const int max_node_str = drmGetMaxNodeName();
|
||||
const int max_node_str = ALIGN(drmGetMaxNodeName(), sizeof(void *));
|
||||
int ret, i;
|
||||
char *addr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue