the entries for file types with magic numbers are
authorMartin Kaiser <wireshark@kaiser.cx>
Wed, 19 Mar 2014 21:51:39 +0000 (22:51 +0100)
committerMartin Kaiser <wireshark@kaiser.cx>
Thu, 20 Mar 2014 08:40:08 +0000 (08:40 +0000)
0...heuristic_open_routine_idx-1

at the moment, we loop over all entries of the open_info_arr

Change-Id: Iabca32521a066d994b1c840b7514faa983375f0c
Reviewed-on: https://code.wireshark.org/review/748
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
wiretap/file_access.c

index 9a43ed2c5c636ff51861933b2586d92e3f3fb27e..bf25186c157b6e97ec722164cb297925dd940db4 100644 (file)
@@ -833,7 +833,7 @@ wtap* wtap_open_offline(const char *filename, unsigned int type, int *err, char
        }
 
        /* Try all file types that support magic numbers */
-       for (i = 0; i < open_info_arr->len; i++) {
+       for (i = 0; i < heuristic_open_routine_idx; i++) {
                /* Seek back to the beginning of the file; the open routine
                   for the previous file type may have left the file
                   position somewhere other than the beginning, and the