projects
/
cubemap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9ec4c94
)
Warn on large Metacube blocks.
author
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Tue, 13 Aug 2013 09:42:41 +0000
(11:42 +0200)
committer
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Tue, 13 Aug 2013 09:42:41 +0000
(11:42 +0200)
httpinput.cpp
patch
|
blob
|
history
diff --git
a/httpinput.cpp
b/httpinput.cpp
index
6de67b2
..
c346a14
100644
(file)
--- a/
httpinput.cpp
+++ b/
httpinput.cpp
@@
-458,6
+458,11
@@
void HTTPInput::process_data(char *ptr, size_t bytes)
uint32_t size = ntohl(hdr->size);
uint32_t flags = ntohl(hdr->flags);
uint32_t size = ntohl(hdr->size);
uint32_t flags = ntohl(hdr->flags);
+ if (size > 65535) {
+ log(WARNING, "[%s] Metacube block of %x bytes (flags=%x); corrupted header?",
+ url.c_str(), size, flags);
+ }
+
// See if we have the entire block. If not, wait for more data.
if (pending_data.size() < sizeof(metacube_block_header) + size) {
return;
// See if we have the entire block. If not, wait for more data.
if (pending_data.size() < sizeof(metacube_block_header) + size) {
return;