reordercap: use the snaplen from the source file
authorPascal Quantin <pascal.quantin@gmail.com>
Mon, 27 Mar 2017 14:11:41 +0000 (16:11 +0200)
committerMichael Mann <mmann78@netscape.net>
Tue, 28 Mar 2017 01:30:53 +0000 (01:30 +0000)
Change-Id: I61871fa10142e2e2fab5e0e579df7530b9e52eef
Reviewed-on: https://code.wireshark.org/review/20746
Reviewed-by: Michael Mann <mmann78@netscape.net>
reordercap.c

index e258693893ccb51bd1cfe493c042c3dd52c6c8cc..8d53fd728f27de0fc7b3b588ce62eab782aef3ab 100644 (file)
@@ -314,11 +314,11 @@ main(int argc, char *argv[])
     /* Open outfile (same filetype/encap as input file) */
     if (strcmp(outfile, "-") == 0) {
       pdh = wtap_dump_open_stdout_ng(wtap_file_type_subtype(wth), wtap_file_encap(wth),
-                                     65535, FALSE, shb_hdrs, idb_inf, nrb_hdrs, &err);
+                                     wtap_snapshot_length(wth), FALSE, shb_hdrs, idb_inf, nrb_hdrs, &err);
       outfile = "standard output";
     } else {
       pdh = wtap_dump_open_ng(outfile, wtap_file_type_subtype(wth), wtap_file_encap(wth),
-                              65535, FALSE, shb_hdrs, idb_inf, nrb_hdrs, &err);
+                              wtap_snapshot_length(wth), FALSE, shb_hdrs, idb_inf, nrb_hdrs, &err);
     }
     g_free(idb_inf);
     idb_inf = NULL;