diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-05-13 01:11:13 -0500 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-06-10 20:15:15 +0200 |
commit | 9bdec97a1991c3cc53d1601eb809e33b154a198d (patch) | |
tree | a7f61a07afbba891ab9089ab0e7317e4d9cb1663 | |
parent | 70b64073f7d1bf56a30f7a809bd984d3ad688b9f (diff) |
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>
-rw-r--r-- | xf86drm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |