projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e69c352
)
Avoid crashing when BURST has missing modes.
author
Michael Poole
<mdpoole@troilus.org>
Sun, 20 May 2007 15:59:43 +0000
(11:59 -0400)
committer
Michael Poole
<mdpoole@troilus.org>
Mon, 28 May 2007 18:46:32 +0000
(14:46 -0400)
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
patch
|
blob
|
history
diff --git
a/src/proto-p10.c
b/src/proto-p10.c
index 85bb122fa310e6d6721cef37149c2f908cd1f685..003bbe62999cf23eb3a7312a99dd9c1f145cba88 100644
(file)
--- 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;