diff --git a/src/proto-smb.c b/src/proto-smb.c index db45c47ebb87077747f76deab14c1736b37bd441..2b6f7f49135c1a31b8a726042a98962c2ea8812e 100644 --- a/src/proto-smb.c +++ b/src/proto-smb.c @@ -85,7 +85,7 @@ struct SmbParams params[] = { {0x73, 6, 2, IT_uint16, offsetof(struct Smb73_Setup, BlobLength)}, - {0xFF, 0, 65536, IT_uint0, 0}, + {0xFF, 0, 0xFF, IT_uint0, 0}, }; @@ -1759,7 +1759,8 @@ smb_parse_record( /***************************************************************************** *****************************************************************************/ -static int negot_add_dialect(unsigned char *buf, size_t sizeof_buf, const char *dialect) +int +negot_add_dialect(unsigned char *buf, size_t sizeof_buf, const char *dialect) { size_t nbt_length; size_t dialect_length = strlen(dialect) + 1; @@ -1825,30 +1826,6 @@ smb0_hello_template[] = { 0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f, 0x00*/ }; -static const char -smb1x_hello_template[] = { - 0x00, 0x00, 0x00, 0x2f, 0xff, 0x53, 0x4d, 0x42, - 0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc0, /* */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x02, - 0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e, - 0x31, 0x32, 0x00 -}; - -static const char -xsmb1_hello_template[] = { - 0x00, 0x00, 0x00, 0x45, 0xff, 0x53, 0x4d, 0x42, - 0x72, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0xc8, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, - 0xff, 0xff, 0x00, 0x00, 0x00, 0x22, 0x00, 0x02, - 0x4e, 0x54, 0x20, 0x4c, 0x4d, 0x20, 0x30, 0x2e, - 0x31, 0x32, 0x00, 0x02, 0x53, 0x4d, 0x42, 0x20, - 0x32, 0x2e, 0x30, 0x30, 0x32, 0x00, 0x02, 0x53, - 0x4d, 0x42, 0x20, 0x32, 0x2e, 0x3f, 0x3f, 0x3f, - 0x00 -}; static const unsigned char diff --git a/src/ranges.c b/src/ranges.c index 423391ba32cfae5e7c70d82631cc86bd91ae7b7b..c2b7441ecdcf76f8a1da34752aea133d25ffb29a 100644 --- a/src/ranges.c +++ b/src/ranges.c @@ -102,7 +102,6 @@ debug_dump_ranges(struct RangeList *task) void rangelist_add_range(struct RangeList *task, unsigned begin, unsigned end) { - unsigned i; struct Range range; range.begin = begin; @@ -127,6 +126,8 @@ rangelist_add_range(struct RangeList *task, unsigned begin, unsigned end) } #if 0 + unsigned i; + /* See if the range overlaps any exist range already in the * list */ for (i = 0; i < task->count; i++) {