diff options
author | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 17:00:52 +0000 |
---|---|---|
committer | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-12 17:00:52 +0000 |
commit | 72f891f407cc2ccd132328e97f1b4dd5eaab72b2 (patch) | |
tree | 92d8cc652d284024de6ea0a50e16888e03babaef /chrome/browser/geolocation/gateway_data_provider_linux.cc | |
parent | b2b0fceea58bf7e13cc73020133aff6d6b4f4640 (diff) | |
download | chromium_src-72f891f407cc2ccd132328e97f1b4dd5eaab72b2.zip chromium_src-72f891f407cc2ccd132328e97f1b4dd5eaab72b2.tar.gz chromium_src-72f891f407cc2ccd132328e97f1b4dd5eaab72b2.tar.bz2 |
Coverity: Fix unchecked return values.
CID=13943, 13746, 13749, 13597, 13249, 13145, 12875, 12874, 12871, 12438, 12436, 12431
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6076006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/gateway_data_provider_linux.cc')
-rw-r--r-- | chrome/browser/geolocation/gateway_data_provider_linux.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/geolocation/gateway_data_provider_linux.cc b/chrome/browser/geolocation/gateway_data_provider_linux.cc index f1779cb..e8f8cf4 100644 --- a/chrome/browser/geolocation/gateway_data_provider_linux.cc +++ b/chrome/browser/geolocation/gateway_data_provider_linux.cc @@ -40,9 +40,10 @@ std::string HexToIpv4Format(std::string& hex_address) { if (hex_address.size() != 8) return ""; std::vector<uint8> bytes; - base::HexStringToBytes(hex_address, &bytes); - if (bytes.size() != 4) + if (!base::HexStringToBytes(hex_address, &bytes) || + bytes.size() != 4) { return ""; + } struct in_addr in; uint32 ip_native_endian; memcpy(&ip_native_endian, &bytes[0], 4); |