diff options
Diffstat (limited to 'epan/tvbuff_composite.c')
-rw-r--r-- | epan/tvbuff_composite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/tvbuff_composite.c b/epan/tvbuff_composite.c index 1926a3e626..a7b9b7c347 100644 --- a/epan/tvbuff_composite.c +++ b/epan/tvbuff_composite.c @@ -113,8 +113,8 @@ composite_get_ptr(tvbuff_t *tvb, guint abs_offset, guint abs_length) } else { /* Use a temporary variable as tvb_memcpy is also checking tvb->real_data pointer */ - void *real_data = g_malloc(abs_length); - tvb_memcpy(tvb, real_data, 0, abs_length); + void *real_data = g_malloc(tvb->length); + tvb_memcpy(tvb, real_data, 0, tvb->length); tvb->real_data = (const guint8 *)real_data; return tvb->real_data + abs_offset; } |