size = tvb_strsize(tvb, offset);
strptr = g_malloc(size);
tvb_memcpy(tvb, strptr, offset, size);
- *lengthp = size;
+ if (lengthp)
+ *lengthp = size;
return strptr;
}
/*
size = tvb_strsize(tvb, offset);
strptr = ep_alloc(size);
tvb_memcpy(tvb, strptr, offset, size);
- *lengthp = size;
+ if (lengthp)
+ *lengthp = size;
return strptr;
}
size = tvb_strsize(tvb, offset);
strptr = se_alloc(size);
tvb_memcpy(tvb, strptr, offset, size);
- *lengthp = size;
+ if (lengthp)
+ *lengthp = size;
return strptr;
}
* Pretend the line runs to the end of the tvbuff.
*/
linelen = eob_offset - offset;
- *next_offset = eob_offset;
+ if (next_offset)
+ *next_offset = eob_offset;
}
} else {
/*
* character in the line, skipping over the last character
* in the line terminator.
*/
- *next_offset = eol_offset + 1;
+ if (next_offset)
+ *next_offset = eol_offset + 1;
}
return linelen;
}
* We pretend the line runs to the end of the tvbuff.
*/
linelen = eob_offset - offset;
- *next_offset = eob_offset;
+ if (next_offset)
+ *next_offset = eob_offset;
break;
}
* over the last character in the line
* terminator, and quit.
*/
- *next_offset = char_offset + 1;
+ if (next_offset)
+ *next_offset = char_offset + 1;
break;
}
}
* We pretend the line runs to the end of the tvbuff.
*/
linelen = eob_offset - offset;
- *next_offset = eob_offset;
+ if (next_offset)
+ *next_offset = eob_offset;
break;
}
}