nwtime->hour = ((data & 0xf800) >> 11);
}
-static char *
-unicode_to_string(char * data, guint32 length)
-{
- guint32 i;
- guint16 character;
- int offset = 0;
- char * buffer = "";
-
- if (data[1] == 0x00){
-
- for (i = 0; i < length; i++) {
- character = data[offset];
- buffer[i] = character & 0xff;
- offset += 2;
- }
- }
- else
- {
- buffer = data;
- }
- return buffer;
-}
-
static proto_item*
padd_normal(ptvcursor_t *ptvc, const ptvc_record *rec)
{
rec->length, rec->endianness);
}
-
static proto_item*
padd_date(ptvcursor_t *ptvc, const ptvc_record *rec)
{
{
if (oldvoffset >= voffset) {
proto_tree_add_text(nvtree, tvb, 0, 0, "[ Invalid offset: %u ]", voffset);
- return;
+ THROW(ReportedBoundsError);
}
oldvoffset = voffset;
switch(syntax_type)
{
if (oldioffset >= ioffset) {
proto_tree_add_text(ntree, tvb, 0, 0, "[ Invalid offset: %u ]", ioffset);
- return;
+ THROW(ReportedBoundsError);
}
oldioffset = ioffset;
ioffset += align_4(tvb, ioffset);
for (r = 0 ; r < 32; r++ )
{
+ oldioffset = ioffset;
if (values->vflags & bvalue)
{
switch(bvalue)
}
ioffset += align_4(tvb, ioffset);
}
+ if (oldioffset >= ioffset) {
+ proto_tree_add_text(ntree, tvb, 0, 0, "[ Invalid offset: %u ]", ioffset);
+ THROW(ReportedBoundsError);
+ }
bvalue = bvalue*2;
if(tvb_length_remaining(tvb, ioffset) < 4 )
{
string_buffer[i][0] = '\0';
pvalues[i].vstring = string_buffer[i];
pvalues[i].mvtype = 0;
+ pvalues[i].vflags = 0;
}
strcpy(req_buffer.buffer, "");