[PATCH] testscript: fix ptyName() returning /dev/pts/4294967296 on s390x
Use uint32 instead of uint (64-bit in Go on s390x) to store the return value of the TIOCGPTN syscall. This is to avoid the 32-bit value from being stored into a 64-bit buffer and get left-shifted by 32 when dereferencing, turning what should be /dev/pts/1 to /dev/pts/4294967296 on big-endian architectures such as s390x.
Special thanks to the explanation and a similar bug fix provided at https://github.com/containerd/console/pull/51
Anthony Fok <foka@debian.org>
no
2024-02-16
Showing 1 to 1 of 1 entry
All known versions for source package 'golang-github-rogpeppe-go-internal'