diff options
Diffstat (limited to 'wiretap/mp2t.c')
-rw-r--r-- | wiretap/mp2t.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/mp2t.c b/wiretap/mp2t.c index 0a432d7031..6004bc6475 100644 --- a/wiretap/mp2t.c +++ b/wiretap/mp2t.c @@ -366,6 +366,11 @@ mp2t_open(wtap *wth, int *err, gchar **err_info) return status; } + if (bitrate == 0) { + /* Prevent an eventual divide by zero */ + return WTAP_OPEN_ERROR; + } + if (-1 == file_seek(wth->fh, first, SEEK_SET, err)) { return WTAP_OPEN_ERROR; } |