OSDN Git Service
Fix the faulty check of parameters in server_c.c:control_getcmd()
The check of the array size in server_c.c:control_getcmd() is wrong
as the nparmas is incremeted after the check with MAX_GETCMD_PARAMS.
Also, there are other bugs that *nparams isn't initialized when the
first token is NULL, etc. Overall, the code is unnecessarily tricky.
This patch simplifies the code and fixes the array size check.
Bugzila: https://bugzilla.novell.com/show_bug.cgi?id=517719
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>