diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-09-16 22:15:57 +0200 |
---|---|---|
committer | Pascal Quantin <pascal.quantin@gmail.com> | 2016-09-17 15:46:36 +0000 |
commit | 22257e8cf5a497cd16dd7336a9b8dd224285ee39 (patch) | |
tree | 72fa8ab79f10aba2e3d4465933f5c7d0bac6684b /epan/proto_data.h | |
parent | 2832f4e97d77324b4e46aac40dae0ce898ae559d (diff) | |
download | wireshark-22257e8cf5a497cd16dd7336a9b8dd224285ee39.tar.gz wireshark-22257e8cf5a497cd16dd7336a9b8dd224285ee39.tar.bz2 wireshark-22257e8cf5a497cd16dd7336a9b8dd224285ee39.zip |
p_XXX_proto_data: only allow the use of pinfo and file scopes
Those are the only ones meaningful. Let's convert the buggy dissectors
and add an assert to avoid the misuse of the pool parameter in the future
Change-Id: I65f470b757f163f11a25cd352ffe168d1f8a86d3
Reviewed-on: https://code.wireshark.org/review/17748
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/proto_data.h')
-rw-r--r-- | epan/proto_data.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/proto_data.h b/epan/proto_data.h index 987eca7b9e..1e8d79abc4 100644 --- a/epan/proto_data.h +++ b/epan/proto_data.h @@ -29,6 +29,7 @@ extern "C" { #include "ws_symbol_export.h" +/* Allocator should be either pinfo->pool or wmem_file_scope() */ WS_DLL_PUBLIC void p_add_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key, void *proto_data); WS_DLL_PUBLIC void *p_get_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key); WS_DLL_PUBLIC void p_remove_proto_data(wmem_allocator_t *scope, struct _packet_info* pinfo, int proto, guint32 key); |