Merged revisions 90163 via svnmerge from
[asterisk/asterisk.git] / apps / app_queue.c
index 274ae30..907fdad 100644 (file)
@@ -4999,7 +4999,7 @@ static int manager_add_queue_member(struct mansession *s, const struct message *
 
        if (ast_strlen_zero(penalty_s))
                penalty = 0;
-       else if (sscanf(penalty_s, "%d", &penalty) != 1)
+       else if (sscanf(penalty_s, "%d", &penalty) != 1 || penalty < 0)
                penalty = 0;
 
        if (ast_strlen_zero(paused_s))