Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Unified Diff: net/spdy/fuzzing/hpack_fuzz_util.cc

Issue 1471073010: Removed unused include of winsock.h/inet.h from sys_byteorder.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include inet.h for things other than byte-swap Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/dns/dns_config_service_posix_unittest.cc ('k') | net/spdy/spdy_frame_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/fuzzing/hpack_fuzz_util.cc
diff --git a/net/spdy/fuzzing/hpack_fuzz_util.cc b/net/spdy/fuzzing/hpack_fuzz_util.cc
index 45f3defa4351027971b38a38fd20ec0f0479dd96..fc9a84a5d3dd057244f5f6b434db52ffb1c085ae 100644
--- a/net/spdy/fuzzing/hpack_fuzz_util.cc
+++ b/net/spdy/fuzzing/hpack_fuzz_util.cc
@@ -121,7 +121,8 @@ bool HpackFuzzUtil::NextHeaderBlock(Input* input,
return false;
}
- size_t length = ntohl(*reinterpret_cast<const uint32*>(input->ptr()));
+ size_t length =
+ base::NetToHost32(*reinterpret_cast<const uint32*>(input->ptr()));
input->offset += sizeof(uint32);
if (input->remaining() < length) {
@@ -134,7 +135,7 @@ bool HpackFuzzUtil::NextHeaderBlock(Input* input,
// static
string HpackFuzzUtil::HeaderBlockPrefix(size_t block_size) {
- uint32 length = htonl(block_size);
+ uint32 length = base::HostToNet32(static_cast<uint32>(block_size));
return string(reinterpret_cast<char*>(&length), sizeof(uint32));
}
« no previous file with comments | « net/dns/dns_config_service_posix_unittest.cc ('k') | net/spdy/spdy_frame_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698