From 7be1709f226624c6bf3697d660407cf89d8626a1 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 19 Jun 2013 10:46:09 -0700 Subject: [PATCH] Correctly detect a malformed currency. --- src/cpp/ripple/ripple_PathRequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/ripple/ripple_PathRequest.cpp b/src/cpp/ripple/ripple_PathRequest.cpp index be2f2e8519..04978d517b 100644 --- a/src/cpp/ripple/ripple_PathRequest.cpp +++ b/src/cpp/ripple/ripple_PathRequest.cpp @@ -188,7 +188,7 @@ int PathRequest::parseJson (const Json::Value& jvParams, bool complete) const Json::Value& jvCur = jvSrcCur[i]; uint160 uCur, uIss; - if (!jvCur.isMember ("currency") || !STAmount::currencyFromString (uCur, jvCur["currency"].asString ())) + if (!jvCur.isArray() || !jvCur.isMember ("currency") || !STAmount::currencyFromString (uCur, jvCur["currency"].asString ())) { jvStatus = rpcError (rpcSRC_CUR_MALFORMED); return PFR_PJ_INVALID;