diff options
author | Guy Harris <gharris@sonic.net> | 2021-09-25 14:09:41 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-09-25 14:09:41 -0700 |
commit | 92d77cef7a53f1cfc284a1b3926122d24c6fae68 (patch) | |
tree | 62d7e2841518a7fb9ea19fff29c3f45add1acc1a /wiretap/file_access.c | |
parent | 047542b587c052fcda641dfdc682a7cecf6138f3 (diff) |
libwiretap: fix test for built-in file types.
The file type/subtype for built-in types are <=
wtap_num_builtin_file_types_subtypes - the plugin types are given
type/subtype values after the last built-in type/subtype value.
Fixes #17614.
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index eacdbd73d9..896a3317f0 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -1396,7 +1396,7 @@ wtap_deregister_file_type_subtype(const int subtype) ws_error("invalid file type to de-register"); return; } - if ((guint)subtype >= wtap_num_builtin_file_types_subtypes) { + if ((guint)subtype < wtap_num_builtin_file_types_subtypes) { ws_error("built-in file types cannot be de-registered"); return; } |