(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-beep.c) |
| |
| 446 | | | dissect_beep_int(tvbuff_t *tvb, int offset, |
| 447 | | | proto_tree *tree, int hf, int *val, int *hfa[]) |
| 448 | | | { |
| 449 | | | proto_item *hidden_item; |
| 450 | | | int ival, ind = 0; |
| 451 | | | unsigned int i = num_len(tvb, offset); |
| 452 | | | guint8 int_buff[100]; |
| 453 | | | |
| 454 | | | memset(int_buff, '\0', sizeof(int_buff)); |
| 455 | | | |
| 456 | | | tvb_memcpy(tvb, int_buff, offset, MIN(sizeof(int_buff) - 1, i));
x /usr/include/glib-2.0/glib/gmacros.h |
| |
201 | #define MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| |
|
Event 1:
sizeof( int_buff ) - 1 < i evaluates to false.
hide
|
|
| 457 | | | |
| 458 | | | |
| 459 | | | |
| 460 | | | sscanf((gchar*)int_buff, "%d", &ival); |
Event 2:
__isoc99_sscanf() does not initialize ival. - This may be because of a failure case or other special case for __isoc99_sscanf(). Consult the __isoc99_sscanf() documentation for more information.
hide
|
|
| 461 | | | |
| 462 | | | if (tree) { |
Event 3:
Taking true branch. tree evaluates to true.
hide
|
|
| 463 | | | proto_tree_add_uint(tree, hf, tvb, offset, i, ival); |
Uninitialized Variable
ival was not initialized. The issue can occur if the highlighted code executes. See related event 2. Show: All events | Only primary events |
|
| |