/* Get the invite information */
tmp = silc_argument_get_arg_type(cmd->args, 4, &len);
- if (tmp) {
+ if (tmp && len > 2) {
/* Parse the arguments to see they are constructed correctly */
SILC_GET16_MSB(argc, tmp);
args = silc_argument_payload_parse(tmp + 2, len - 2, argc);
/* Get the ban information */
tmp = silc_argument_get_arg_type(cmd->args, 3, &len);
- if (tmp) {
+ if (tmp && len > 2) {
/* Parse the arguments to see they are constructed correctly */
SILC_GET16_MSB(argc, tmp);
args = silc_argument_payload_parse(tmp + 2, len - 2, argc);
/* Get invite list */
tmp = silc_argument_get_arg_type(args, 5, &tmp_len);
- if (!tmp)
+ if (!tmp || tmp_len < 2)
goto out;
/* Parse the arguments to see they are constructed correctly */
/* Get ban list */
tmp = silc_argument_get_arg_type(args, 3, &tmp_len);
- if (!tmp)
+ if (!tmp || tmp_len < 2)
goto out;
/* Parse the arguments to see they are constructed correctly */
}
/* Delete information to invite list */
- if (action && list) {
+ if (action == 0x01 && list) {
/* Now delete the arguments from invite list */
tmp = silc_argument_get_first_arg(args, &type, &len);
while (tmp) {