From 042ddc6d1e0d56de91b365ab894d7ac836c786e1 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Sun, 15 Feb 2015 14:20:19 +0200 Subject: [PATCH] Align fw_handle buffer for 64-bit access Align fw_handle buffer for 64-bit access. This fixes SIGBUS on SPARC when capturing DV stream with "dvgrab". [Stefan R: If libraw1394 is compiled for 32 bit userland, struct fw_handle.buffer was only 32 bit aligned. Various *__u64 accesses happen to the buffer, and those accesses require 64 bit alignment on some CPU architectures. The bug certainly affected all libraw1394 client applications on such architectures with 32 bit userland.] Signed-off-by: Aaro Koskinen Signed-off-by: Stefan Richter --- src/fw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fw.h b/src/fw.h index 0a079c7..f7daf07 100644 --- a/src/fw.h +++ b/src/fw.h @@ -131,7 +131,7 @@ struct fw_handle { struct fw_cdev_iso_packet *packets; } iso; - char buffer[BUFFER_SIZE]; + __u64 buffer[BUFFER_SIZE / sizeof(__u64)]; }; typedef struct fw_handle *fw_handle_t;