- if( buffer_len2 != buffer_len && hfinfo->type == FT_STRING && tvb_reported_length_remaining(tvb,offset) > (gint)buffer_len2) {
- /* Max can be bigger that len
- * if the packet is comming from windows it normally means that the
- * last two bytes are null terminators. In this case we change the length
- * in order to consume them ...
- * If it's from samba then it's more unlikely to be terminator so we carefully check if
- * it's null terminators or not in order to know if we should consume them */
-
- buf = ep_alloc(sizeof(guint8)*buffer_len2);
- tvb_memcpy(tvb,buf,offset,buffer_len2);
- if( buf[buffer_len2-2] == 0x0 && buf[buffer_len2-1] == 0x0) {
- buffer_len = buffer_len2;
- }
- }