Skip to content

Commit

Permalink
Merge pull request #178 from bitshares/abitmore-patch-1
Browse files Browse the repository at this point in the history
Fix potential out-of-bounds access
  • Loading branch information
abitmore authored Nov 8, 2019
2 parents ad3c881 + 1d028b3 commit 2568867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/network/http/http_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ std::vector<header> parse_urlencoded_params( const std::string& f ) {
std::vector<header> h(num_args);
int arg = 0;
for( size_t i = 0; i < f.size(); ++i ) {
while( f[i] != '=' && i < f.size() ) {
while( i < f.size() && f[i] != '=' ) {
if( f[i] == '%' ) {
h[arg].key += char((fc::from_hex(f[i+1]) << 4) | fc::from_hex(f[i+2]));
i += 3;
Expand Down

0 comments on commit 2568867

Please sign in to comment.