aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-10 15:06:23 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-18 15:15:26 +0000
commit187a6ab2d24df7e85c85c19d83c4820878a713cc (patch)
tree76ee2316a4ecdfc9a2a77c70537b04fdf00793cd
parentcheckpoints: trap failure to load JSON checkpoints (diff)
downloadmonero-187a6ab2d24df7e85c85c19d83c4820878a713cc.tar.xz
epee: trap failure to parse URI from request
-rw-r--r--contrib/epee/include/net/http_protocol_handler.inl7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/epee/include/net/http_protocol_handler.inl b/contrib/epee/include/net/http_protocol_handler.inl
index c555707ac..c18f7f706 100644
--- a/contrib/epee/include/net/http_protocol_handler.inl
+++ b/contrib/epee/include/net/http_protocol_handler.inl
@@ -345,7 +345,12 @@ namespace net_utils
{
analize_http_method(result, m_query_info.m_http_method, m_query_info.m_http_ver_hi, m_query_info.m_http_ver_hi);
m_query_info.m_URI = result[10];
- parse_uri(m_query_info.m_URI, m_query_info.m_uri_content);
+ if (!parse_uri(m_query_info.m_URI, m_query_info.m_uri_content))
+ {
+ m_state = http_state_error;
+ MERROR("Failed to parse URI: m_query_info.m_URI");
+ return false;
+ }
m_query_info.m_http_method_str = result[2];
m_query_info.m_full_request_str = result[0];