summaryrefslogtreecommitdiff
path: root/src/RpcMethodImpl.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-02-26 21:49:37 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-02-26 21:49:37 +0900
commitf4e0eae904ff94af3f6b80cbfc3175cb4b24c2cd (patch)
treedb262cf5974adc5106e821fac9fa78fc2aa42d93 /src/RpcMethodImpl.cc
parentad11d746f09977ce151ef6f49dd971f4af451d44 (diff)
Added checkRequiredInteger() to check integer param is in valid range.
Ensure that fileIndex in aria2.changeUri RPC method is greater than or equal to 1.
Diffstat (limited to 'src/RpcMethodImpl.cc')
-rw-r--r--src/RpcMethodImpl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/RpcMethodImpl.cc b/src/RpcMethodImpl.cc
index f351f2a9..fd190773 100644
--- a/src/RpcMethodImpl.cc
+++ b/src/RpcMethodImpl.cc
@@ -1392,7 +1392,7 @@ SharedHandle<ValueBase> ChangeUriRpcMethod::process
(const RpcRequest& req, DownloadEngine* e)
{
const String* gidParam = checkRequiredParam<String>(req, 0);
- const Integer* indexParam = checkRequiredParam<Integer>(req, 1);
+ const Integer* indexParam = checkRequiredInteger(req, 1, IntegerGE(1));
const List* delUrisParam = checkRequiredParam<List>(req, 2);
const List* addUrisParam = checkRequiredParam<List>(req, 3);
const Integer* posParam = checkParam<Integer>(req, 4);