Skip to content

execl() in clear_screen needs a NULL terminator. #55

@PinkPandaKatie

Description

@PinkPandaKatie

On startup, cpm prints:

Usage: clear [options]

Options:
  -T TERM     use this instead of $TERM
  -V          print curses-version
  -x          do not try to clear scrollback

This is because it calls execl("/usr/bin/clear", "clear") instead of execl("/usr/bin/clear", "clear", NULL). Forgetting the NULL terminator for the argument list causes execl to pass additional garbage arguments from registers or stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions