]> git.tuebingen.mpg.de Git - paraslash.git/commit
Handle empty command lines properly.
authorAndre Noll <maan@systemlinux.org>
Sat, 22 Jun 2013 14:59:04 +0000 (16:59 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 22 Jun 2013 14:59:04 +0000 (16:59 +0200)
commitbb5101625c76c3bfa5fe516e6e669a43108ff597
treef816fde6cfa05564fbb0767b6d5d6ea0e74e989e
parent3b7cc768deb62e635bd06541418d22b59d35883c
Handle empty command lines properly.

Both para_client and para_audioc create an argument vector from the
given command line using create_argv(). If the command line contains
only whitespace characters, this vector has length zero, and argv[0]
is NULL.

We missed to check for this at at least three places in audioc.c,
client.c and audiod_command.c, which resulted in crashes due to NULL
pointer dereferences or failed assertions.

These bugs can easily be triggered by starting para_client or
para_audioc in interactive mode, entering a single space character
and hitting return.

This patch adds the missing checks to prevent the crashes.
audioc.c
audiod_command.c
client.c