Wireshark-commits: [Wireshark-commits] master 7f07436: Fix bug 9790: Lua: wslua allows duplicate fi

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 21 Feb 2014 20:57:45 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=7f074364b62b0e7a6a8660e48c9803ebcaa1c8fc
Submitter: Evan Huus (eapache@xxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

7f07436 by Hadriel Kaplan (hadrielk@xxxxxxxxx):

    Fix bug 9790: Lua: wslua allows duplicate field registration
    
    As discussed in bug 3513 and 9709, one can register more than one new ProtoFields for
    the same field name. Of course C-code can do that too, and does a LOT apparently, but
    if they're not similar ftypes then things can get scrweed up in display filters.
    
    So this change prevents duplicate field registration of dissimilar ftypes. The
    similarity is based on the discussion on the mailing list, and the listing in
    README.developer has been updated to refelect that as well.
    
    Also, this change adds a testscript for Proto/ProtoFields.
    
    Change-Id: I43bd323f785245941a21289647332a19adec2a9d
    Reviewed-on: https://code.wireshark.org/review/285
    Reviewed-by: Evan Huus <eapache@xxxxxxxxx>
    

Actions performed:

    from  1b210e9   Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
    adds  7f07436   Fix bug 9790: Lua: wslua allows duplicate field registration


Summary of changes:
 doc/README.dissector                  |   14 +-
 epan/ftypes/ftypes.c                  |   63 ++++++++
 epan/ftypes/ftypes.h                  |    5 +
 epan/wslua/wslua_proto.c              |  287 ++++++++++++++++-----------------
 test/lua/{dissector.lua => proto.lua} |  281 ++++++++++++++++++++++++++------
 test/suite-wslua.sh                   |   28 ++++
 6 files changed, 470 insertions(+), 208 deletions(-)
 copy test/lua/{dissector.lua => proto.lua} (64%)