Wireshark-commits: [Wireshark-commits] master eb93f3b: Don't do unsafe pointer casting

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 24 Nov 2014 01:04:23 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=eb93f3bdfb1c403bd500eff48ce5e6618680ecc2
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

eb93f3b by Guy Harris (guy@xxxxxxxxxxxx):

    Don't do unsafe pointer casting
    
    Don't cast a pointer-to-int into a pointer-to-pointer and pass the
    resulting pointer to g_hash_table_lookup_extended() - pointers and ints
    are *not* guaranteed to be the same size.  Instead, just have a variable
    of type gpointer, pass a pointer to *that*, and then run that result
    through GPOINTER_TO_UINT().
    
    This fixes a reproducible crash.
    
    Change-Id: I42954f222ab59866cb909b80d9dbb1d2668d2aff
    Reviewed-on: https://code.wireshark.org/review/5457
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  ec650d4   elf: separate ett for program and sections entries
    adds  eb93f3b   Don't do unsafe pointer casting


Summary of changes:
 epan/conversation_table.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)