Wireshark-commits: [Wireshark-commits] rev 52842: /trunk/epan/dissectors/ /trunk/epan/dissectors/:
Date: Fri, 25 Oct 2013 14:04:23 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=52842

User: morriss
Date: 2013/10/25 02:04 PM

Log:
 Fix CID 1111806: it's not safe to check if "tag < sizeof(tag_to_type)" before
 accessing tag_to_type[tag]: while the array is made of enums and the values of
 the enum will fit in a guint8 (making the conditional safe) compilers don't
 *have* to "right size" the storage for the enum.  They very well could be lazy
 and store the enum in int's.
 
 Replace it with a macro that tells us the size of the array.

Directory: /trunk/epan/dissectors/
  Changes    Path          Action
  +5 -4      file-elf.c    Modified