Source: cockpit Severity: normal Tags: patch upstream User: debian-sp...@lists.debian.org Usertags: sparc64
Hi! cockpit FTBFS on sparc64 due to unaligned access. The attached package fixes it. I have also forwarded the issue upstream [1]. Adrian > [1] https://github.com/cockpit-project/cockpit/pull/13435 -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Description: websocket: Fix unaligned access in send_prefixed_message_rfc6455() Fixes the build on sparc64. . Author: John Paul Adrian Glaubitz <glaub...@physik.fu-berlin.de> Forwarded: https://github.com/cockpit-project/cockpit/pull/13435 Last-Update: 2020-01-22 Index: cockpit-210/src/websocket/websocketconnection.c =================================================================== --- cockpit-210.orig/src/websocket/websocketconnection.c +++ cockpit-210/src/websocket/websocketconnection.c @@ -430,9 +430,10 @@ send_prefixed_message_rfc6455 (WebSocket */ if (!self->pv->server_side) { + guint32 rand = g_random_int (); outer[1] |= 0x80; mask = outer + bytes->len; - * ((guint32 *)mask) = g_random_int (); + memcpy (mask, &rand, sizeof(guint8)); bytes->len += 4; }