mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-31 20:48:56 +00:00
rtpulpfec: fix potential alignment issue in xor function
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753#note_646453 for context Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/753>
This commit is contained in:
parent
591af0f38a
commit
ed2b5e6cfc
1 changed files with 7 additions and 1 deletions
|
@ -123,7 +123,13 @@ _xor_mem (guint8 * restrict dst, const guint8 * restrict src, gsize length)
|
|||
guint i;
|
||||
|
||||
for (i = 0; i < (length / sizeof (guint64)); ++i) {
|
||||
*((guint64 *) dst) ^= *((const guint64 *) src);
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
GST_WRITE_UINT64_LE (dst,
|
||||
GST_READ_UINT64_LE (dst) ^ GST_READ_UINT64_LE (src));
|
||||
#else
|
||||
GST_WRITE_UINT64_BE (dst,
|
||||
GST_READ_UINT64_BE (dst) ^ GST_READ_UINT64_BE (src));
|
||||
#endif
|
||||
dst += sizeof (guint64);
|
||||
src += sizeof (guint64);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue