|
From: andypugh <no...@gi...> - 2026-05-24 18:45:03
|
Branch: refs/heads/master Home: https://github.com/LinuxCNC/linuxcnc Commit: 716a3ac7ca439ba1c8b80f1b6810530414c29508 https://github.com/LinuxCNC/linuxcnc/commit/716a3ac7ca439ba1c8b80f1b6810530414c29508 Author: is-primary-dev <215...@us...> Date: 2026-05-16 (Sat, 16 May 2026) Changed paths: M src/rtapi/uspace_rtapi_main.cc Log Message: ----------- fix: cast char to unsigned char in get_uint16 to prevent sign-extension std::vector<char> uses signed char on x86-64 GCC. When a byte >= 0x80 is cast directly to uint16_t, it sign-extends (e.g. 0xA3 becomes 0xFFA3), corrupting the deserialized argument length in the rtapi_app socket protocol. This causes "arg size not in buffer range" errors for any loadrt argument longer than 127 bytes. Cast through unsigned char before widening to uint16_t. The companion push_uint16 already masks with 0xff, so only the read side was affected. Commit: 2d341e419d2428457a4c89ef38a04e0484fe4d3f https://github.com/LinuxCNC/linuxcnc/commit/2d341e419d2428457a4c89ef38a04e0484fe4d3f Author: andypugh <an...@bo...> Date: 2026-05-24 (Sun, 24 May 2026) Changed paths: M src/rtapi/uspace_rtapi_main.cc Log Message: ----------- Merge pull request #4035 from is-primary-dev/fix-rtapi-get-uint16-sign-extension fix: cast char to unsigned char in get_uint16 to prevent sign-extension Compare: https://github.com/LinuxCNC/linuxcnc/compare/8ea36d388ce0...2d341e419d24 To unsubscribe from these emails, change your notification settings at https://github.com/LinuxCNC/linuxcnc/settings/notifications |