From d6aa77d83b0b5335754b40c0d84af08252626c95 Mon Sep 17 00:00:00 2001 From: Diederik de Groot Date: Tue, 26 Aug 2014 18:33:54 +0200 Subject: Skinny: Do not try to create a wmem_strbuf whose size is bigger than the max size allowed -> using wmem_strbuf_new instead of wmem_strbuf_sized_new (Evan Huus) While we are at it, fix errors spotted by the pre-commit tools/SkinnyProtocolOptimized -> Did not get any, can you specify which errors ? (Pascal Quantin) FT_IPv6: 'ENC_BIG_ENDIAN | ENC_NA' -> 'ENC_NA' only (2) (Pascal Quantin) Revert back to wmem_strbuf_sized_new instead of wmem_strbuf_new (Pascal Quantin) Use wmem_strbuf_sized_new maxlength = 0 (Pascal Quantin) Bug: 10409 Bug: 10410 Change-Id: Iebfcb53bc0a6289e02d10c38ecb717aa5c89389e Reviewed-on: https://code.wireshark.org/review/3862 Reviewed-by: Pascal Quantin --- tools/parse_xml2skinny_dissector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/parse_xml2skinny_dissector.py b/tools/parse_xml2skinny_dissector.py index 8b6a8fc198..c1b3ae5c8a 100755 --- a/tools/parse_xml2skinny_dissector.py +++ b/tools/parse_xml2skinny_dissector.py @@ -474,11 +474,11 @@ def xml2obj(src): if self.subtype == "DisplayLabel": if self.basemessage.dynamic == "yes": - ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, 0, %d);\n' %(self.name, self.intsize)) + ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, 0);\n' %(self.name)) elif self.size_fieldname: - ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, %s, %d);\n' %(self.name, self.size_fieldname, self.intsize)) + ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, %s);\n' %(self.name, self.size_fieldname)) else: - ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, %s, %d);\n' %(self.name, self.size, self.intsize)) + ret += self.indent_out('dissect_skinny_displayLabel(cursor, hf_skinny_%s, %s);\n' %(self.name, self.size)) elif self.basemessage.dynamic == "yes": ret += self.indent_out('%s_len = tvb_strnlen(ptvcursor_tvbuff(cursor), ptvcursor_current_offset(cursor), -1)+1;\n' %self.name) -- cgit v1.2.3