diff options
author | Roland Knall <rknall@gmail.com> | 2022-06-22 11:38:39 +0200 |
---|---|---|
committer | Roland Knall <rknall@gmail.com> | 2022-06-23 11:00:51 +0200 |
commit | 4c768f54a73ec685761be468ad3580cf799a6714 (patch) | |
tree | 7eac71196bfb59d6804d7eb4ddc0f611585424d4 /epan/address.h | |
parent | 39fc49b792f350ea56b945a1d26a149bcf2a754b (diff) |
epan: Make AT_NUMERIC behave more safely
Implement a better handling of byte sizes as well as preventing
possible memory bleeds
Fixes: 18147
Diffstat (limited to 'epan/address.h')
-rw-r--r-- | epan/address.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/epan/address.h b/epan/address.h index 9016ba72a0..21f5768b59 100644 --- a/epan/address.h +++ b/epan/address.h @@ -28,6 +28,12 @@ extern "C" { * If an address type is added here, it must be "registered" within address_types.c * For dissector address types, just use the address_type_dissector_register function * from address_types.h + * + * AT_NUMERIC - a numeric address type can consist of a guint8, guint16, guint32 or guint64 + * little-endian value. If no correct length is provided, to avoid data bleed, a guint8 is + * assumed. If the value represented is originating from a big-endian system, it is the + * responsibility of the dissector to do the proper conversion. Only representation (aka + * conversion of value to string) is implemented for this type. */ typedef enum { AT_NONE, /* no link-layer address */ @@ -42,7 +48,7 @@ typedef enum { AT_IB, /* Infiniband GID/LID */ AT_AX25, /* AX.25 */ AT_VINES, /* Banyan Vines address */ - AT_NUMERIC, /* Numeric address type */ + AT_NUMERIC, /* Numeric address type. */ AT_END_OF_LIST /* Must be last in list */ } address_type; |