Skip to content

Commit c97f2a8

Browse files
committed
Don't allow a blank fantasy command to continue running.
(This can access invalid vector indicies and potentially segfault.)
1 parent b25f389 commit c97f2a8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diceserv.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,6 +2191,8 @@ bool DiceServData::PreParse(CommandSource &source, const std::vector<Anope::stri
21912191
// Set up the dice, chan, and comment strings
21922192
if (source.c)
21932193
{
2194+
if (params.size() < 2)
2195+
return false;
21942196
this->chanStr = params[0];
21952197
this->diceStr = params[1];
21962198
if (expectedChannelPos != 1)

0 commit comments

Comments
 (0)