From bc8461e95aafc26b36ee41ca66ff5aabfb6d728f Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Sun, 20 May 2007 11:59:43 -0400 Subject: [PATCH] Avoid crashing when BURST has missing modes. src/proto-p10.c (cmd_burst): If the expected number of modes is larger than the actual number, only unsplit and advance by the actual number. --- src/proto-p10.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proto-p10.c b/src/proto-p10.c index 85bb122..003bbe6 100644 --- a/src/proto-p10.c +++ b/src/proto-p10.c @@ -1231,6 +1231,8 @@ static CMD_FUNC(cmd_burst) if ((*pos == 'k') || (*pos == 'l') || (*pos == 'A') || (*pos == 'U')) n_modes++; + if (next + n_modes > argc) + n_modes = argc - next; unsplit_string(argv+next, n_modes, modes); next += n_modes; break; -- 2.20.1