forked from osmocom/wireshark
Fix Coverity CID 1050093: Dereference before null check.
svn path=/trunk/; revision=50668
This commit is contained in:
parent
02fa8a5d19
commit
70cac937e8
|
@ -201,8 +201,14 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
|
|||
*/
|
||||
|
||||
tvb->real_data = buf;
|
||||
if (fd) {
|
||||
tvb->length = fd->cap_len;
|
||||
tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
|
||||
} else {
|
||||
tvb->length = 0;
|
||||
tvb->reported_length = 0;
|
||||
}
|
||||
|
||||
tvb->initialized = TRUE;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue