avoid segfault for mentioned buf in #issue 594 

please review libr/cmd/cmd.c +175