From: Yu Watanabe Date: Thu, 16 Jul 2026 16:16:07 +0000 (+0900) Subject: udev-util: bound leading whitespace skip in udev_replace_whitespace (#42757) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95648d612a8963d67963e2b1ac0d0a5cf5beeee4;p=thirdparty%2Fsystemd.git udev-util: bound leading whitespace skip in udev_replace_whitespace (#42757) udev_replace_whitespace() is documented to read at most 'len' bytes from 'str': - the strspn() skip of leading whitespace stops at a non-space byte or NUL, not at 'len' - ata_id passes the space padded, non-NUL-terminated ATA IDENTIFY model/serial/fw fields - an all-blank field reads off the end of the 512-byte hd_driveid stack struct Capped the skip to 'len'; existing outputs are unchanged. Added a regression test. --- 95648d612a8963d67963e2b1ac0d0a5cf5beeee4