cpm icon indicating copy to clipboard operation
cpm copied to clipboard

execl() in clear_screen needs a NULL terminator.

Open PinkPandaKatie opened this issue 6 years ago • 1 comments

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.

PinkPandaKatie avatar Mar 01 '19 14:03 PinkPandaKatie

Ah..nice.never had that issue. if you make a pull request I will merge it

comotion avatar Mar 08 '19 22:03 comotion