Skip to content
Snippets Groups Projects
  • George Joseph's avatar
    ab4d3653
    chan_vpb: Fix a gcc 7 out-of-bounds complaint · ab4d3653
    George Joseph authored
    chan_vpb was trying to use sizeof(*p->play_dtmf), where
    p->play_dtmf is defined as char[16], to get the length of the array
    but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)
    returns the size of the first array element, which is 1.  gcc7
    validly complains because the context in which it's used could
    cause an out-of-bounds condition.
    
    Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba
    ab4d3653
    History
    chan_vpb: Fix a gcc 7 out-of-bounds complaint
    George Joseph authored
    chan_vpb was trying to use sizeof(*p->play_dtmf), where
    p->play_dtmf is defined as char[16], to get the length of the array
    but since p->play_dtmf is an actual array, sizeof(*p->play_dtmf)
    returns the size of the first array element, which is 1.  gcc7
    validly complains because the context in which it's used could
    cause an out-of-bounds condition.
    
    Change-Id: If9c4bfdb6b02fa72d39e0c09bf88900663c000ba