diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-09-20 21:16:26 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2012-09-20 21:16:26 +0000 |
commit | 93b1a4d5111f257348981c1d715ea0563eaa604f (patch) | |
tree | 3a27691c1ce36ec0aecb02a24a17d9c3100b4336 /file.c | |
parent | 4faf9092673d36817113e4376ea328cb9ab9e5d1 (diff) |
(Try to) fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5808 :
Use and free err_info in cf_continue_tail() and cf_finish_tail().
(Untested because I'm not sure how to corrupt a file to exercise this code path...)
svn path=/trunk/; revision=45032
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -860,8 +860,9 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err) } else if (*err != 0) { /* We got an error reading the capture file. XXX - pop up a dialog box instead? */ - g_warning("Error \"%s\" while reading: \"%s\"\n", - wtap_strerror(*err), cf->filename); + g_warning("Error \"%s\" while reading: \"%s\" (\"%s\")", + wtap_strerror(*err), err_info, cf->filename); + g_free(err_info); return CF_READ_ERROR; } else @@ -958,6 +959,10 @@ cf_finish_tail(capture_file *cf, int *err) if (*err != 0) { /* We got an error reading the capture file. XXX - pop up a dialog box? */ + + g_warning("Error \"%s\" while reading: \"%s\" (\"%s\")", + wtap_strerror(*err), err_info, cf->filename); + g_free(err_info); return CF_READ_ERROR; } else { return CF_READ_OK; |