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
Nicolai Hähnle 2016-05-13 01:11:13 -05:00
parent 70b64073f7
commit 9bdec97a19
1 changed files with 1 additions and 1 deletions

View File

@ -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;