Revert r50668, remove fd check to fix CID 1050093

svn path=/trunk/; revision=50698
This commit is contained in:
Jakub Zawadzki 2013-07-17 17:10:52 +00:00
parent 33cf749c19
commit 30d5ffbe79
1 changed files with 3 additions and 9 deletions

View File

@ -201,14 +201,8 @@ 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->length = fd->cap_len;
tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len;
tvb->initialized = TRUE;
/*
@ -223,7 +217,7 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
/* don't care, reassemble code was doing whole copy of data, so it'll work the same */
/* XXX, wtap_can_seek() */
if (fd && cfile.wth && cfile.wth->random_fh) {
if (cfile.wth && cfile.wth->random_fh) {
frame_tvb->wth = cfile.wth;
frame_tvb->file_off = fd->file_off;
frame_tvb->offset = 0;