[Midnightbsd-cvs] [MidnightBSD/src] 3d3e5b: w: harden tty path handling and width math

Lucas Holt noreply at github.com
Fri May 1 11:33:00 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: 3d3e5b221e46ea188115e4e413c40358e997bd90
      https://github.com/MidnightBSD/src/commit/3d3e5b221e46ea188115e4e413c40358e997bd90
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-05-01 (Fri, 01 May 2026)

  Changed paths:
    M usr.bin/w/Makefile
    A usr.bin/w/tests/Makefile
    A usr.bin/w/tests/w_test.sh
    M usr.bin/w/w.c

  Log Message:
  -----------
  w: harden tty path handling and width math

Reject suspicious utmpx ut_line values to avoid path traversal in /dev lookups and prevent argwidth underflow on narrow terminals. Add basic ATF smoke tests for w/uptime.

AI-Assisted-by: GPT-5.2 (Codex CLI)
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications


More information about the Midnightbsd-cvs mailing list