mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
Add excess data inflate test
Signed-off-by: Damian Jarek <damian.jarek93@gmail.com>
This commit is contained in:
committed by
Vinnie Falco
parent
610a2681e4
commit
3b585f660c
@@ -362,7 +362,12 @@ public:
|
||||
#endif
|
||||
|
||||
check({0x63, 0x18, 0x05, 0x40, 0x0c, 0x00}, {}, 8, 3);
|
||||
|
||||
check({0xed, 0xc0, 0x81, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xa0, 0xfd, 0xa9, 0x17, 0xa9, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x06}, {});
|
||||
}
|
||||
|
||||
void check(
|
||||
@@ -432,15 +437,11 @@ public:
|
||||
check({0xed, 0xc0, 0x01, 0x01, 0x00, 0x00, 0x00, 0x40,
|
||||
0x20, 0xff, 0x57, 0x1b, 0x42, 0x2c, 0x4f},
|
||||
error::end_of_stream);
|
||||
// check({0xed, 0xc0, 0x81, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
// 0xa0, 0xfd, 0xa9, 0x17, 0xa9, 0x00, 0x00, 0x00,
|
||||
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x06},
|
||||
// error::end_of_stream); // FIXME: zlib expects an error here
|
||||
check({0x02, 0x08, 0x20, 0x80, 0x00, 0x03, 0x00},
|
||||
error::end_of_stream);
|
||||
// TODO: Excess data (from golang test inflate suite), should this be an error?
|
||||
check({0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x78, 0x9c, 0xff},
|
||||
error::invalid_stored_length);
|
||||
}
|
||||
|
||||
void testInvalidSettings()
|
||||
|
Reference in New Issue
Block a user