vtm: Restore patch to fix alignment of data

as a follow-up of commit 8f2c1b0fe4.

Please always test on arm (32-bit) arch if you modify or delete it.
This commit is contained in:
Tee KOBAYASHI 2023-01-22 18:48:44 +09:00 committed by xtkoba
parent 9a9ffa4a3c
commit c55303d60f
2 changed files with 18 additions and 0 deletions

View File

@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_LICENSE_FILE="../LICENSE"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.9.8o"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/netxs-group/vtm/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f1a3e769c2de82bb14d56c490d2a9d3f15512e3b346244a3dcd93fc3ea22881e
TERMUX_PKG_DEPENDS="libandroid-spawn, libc++"

View File

@ -0,0 +1,17 @@
https://github.com/termux/termux-packages/issues/13594
Please always test on arm (32-bit) arch if you modify or delete this patch.
--- a/src/netxs/desktopio/directvt.hpp
+++ b/src/netxs/desktopio/directvt.hpp
@@ -182,7 +182,9 @@ namespace netxs::directvt
log("dtvt: corrupted integer data");
return D{};
}
- auto crop = netxs::letoh(*reinterpret_cast<D const*>(data.data()));
+ auto data_aligned = D{};
+ ::memcpy(&data_aligned, data.data(), sizeof(D));
+ auto crop = netxs::letoh(data_aligned);
if constexpr (!PeekOnly)
{
data.remove_prefix(sizeof(D));