Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 5802] Rewrite&cleanup wiretap/file_wrappers

Date: Fri, 8 Apr 2011 13:04:55 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5802

--- Comment #33 from Jakub Zawadzki <darkjames@xxxxxxxxxxxxxxxx> 2011-04-08 13:04:54 PDT ---
(In reply to comment #31)
> OK, it fixes the "uncompression error" problem, and I saw the progress bar
> weirdness without the patch, so it might be re-evaluating the size of the file
> midstream (that code needs some work for a variety of reasons).

The easiest fix would to always give file position (from wtap_read_so_far())

>         /* Well, it's not one of the types of file we know about. */
>         /* XXX, free wth->fh->fast_seek */
>         if (wth->random_fh != NULL)
>                 file_close(wth->random_fh);
>         file_close(wth->fh);
>         g_free(wth);
>         *err = WTAP_ERR_FILE_UNKNOWN_FORMAT;
>         return NULL;
> 
> Does it need to free the fast_seek stuff at that point?  If so, that needs to
> be in the patch as well, so we don't leak memory.

Ok, but can I just call wtap_close() there? Or do I need seperate routine to
free fast_seek? (don't like)

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.