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 <aaro.koskinen@iki.fi>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
This commit is contained in:
Aaro Koskinen 2015-02-15 14:20:19 +02:00 committed by Stefan Richter
parent c756fb8321
commit 042ddc6d1e
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ struct fw_handle {
struct fw_cdev_iso_packet *packets; struct fw_cdev_iso_packet *packets;
} iso; } iso;
char buffer[BUFFER_SIZE]; __u64 buffer[BUFFER_SIZE / sizeof(__u64)];
}; };
typedef struct fw_handle *fw_handle_t; typedef struct fw_handle *fw_handle_t;