diff mbox

[Bug,2910] odph_iplookup_table_put_value() uses overlapping pointer addresses

Message ID 0100015ad281b9d0-3e946dc5-76a0-4834-a16b-a39aa001212d-000000@email.amazonses.com
State New
Headers show

Commit Message

bugzilla-daemon@bugs.linaro.org March 15, 2017, 3:06 p.m. UTC
https://bugs.linaro.org/show_bug.cgi?id=2910

--- Comment #1 from Matias Elo <matias.elo@nokia.com> ---
The following patch fixes the problem but is it a valid change?

 helper/iplookuptable.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
diff mbox

Patch

diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c
index aae2199..37d31e3 100644
--- a/helper/iplookuptable.c
+++ b/helper/iplookuptable.c
@@ -42,6 +42,10 @@ 
  */
 typedef struct {
        union {
+               odp_buffer_t nexthop;
+               void *ptr;
+       };
+       union {
                uint8_t u8;
                struct {
 #if ODP_BYTE_ORDER == ODP_BIG_ENDIAN
@@ -53,10 +57,6 @@  typedef struct {
 #endif
                };
        };
-       union {
-               odp_buffer_t nexthop;
-               void *ptr;
-       };
 } prefix_entry_t;

 #define ENTRY_SIZE (sizeof(prefix_entry_t) + sizeof(odp_buffer_t))