LCOV - code coverage report
Current view: top level - src/common - url.cpp (source / functions) Hit Total Coverage
Test: fuzz_coverage.info Lines: 0 11 0.0 %
Date: 2023-11-12 01:39:15 Functions: 0 1 0.0 %
Branches: 0 10 0.0 %

           Branch data     Line data    Source code
       1                 :            : // Copyright (c) 2015-2022 The Bitcoin Core developers
       2                 :            : // Distributed under the MIT software license, see the accompanying
       3                 :            : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4                 :            : 
       5                 :            : #include <common/url.h>
       6                 :            : 
       7                 :            : #include <event2/http.h>
       8                 :            : 
       9                 :            : #include <cstdlib>
      10                 :            : #include <string>
      11                 :            : 
      12                 :          0 : std::string urlDecode(const std::string &urlEncoded) {
      13                 :          0 :     std::string res;
      14         [ #  # ]:          0 :     if (!urlEncoded.empty()) {
      15         [ #  # ]:          0 :         char *decoded = evhttp_uridecode(urlEncoded.c_str(), false, nullptr);
      16         [ #  # ]:          0 :         if (decoded) {
      17         [ #  # ]:          0 :             res = std::string(decoded);
      18                 :          0 :             free(decoded);
      19                 :          0 :         }
      20                 :          0 :     }
      21                 :          0 :     return res;
      22         [ #  # ]:          0 : }

Generated by: LCOV version 1.14