]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Avoid segfault in com_sender().
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 22 Aug 2015 14:21:53 +0000 (16:21 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 30 Aug 2015 10:56:09 +0000 (12:56 +0200)
commit8221acb64e0dc17a9fc332cb167fb3fe3fa94678
tree14fc1b61d8675cde3f1b364fd231f1a85d97db6d
parent1565acea5e9fe7413831c3a49032f35f721de608
server: Avoid segfault in com_sender().

If exactly one argument is given to the sender command, and this
argument is the name of an existing sender, the sender command
segfaults due to the NULL pointer dereference. The problem is an
off-by-one bug in the check for the number of arguments.

This patch makes sure we never dereference argv[2] if it is NULL.
command.c