Skip to content
Snippets Groups Projects
  • Gianluca Merlo's avatar
    8f94f947
    func_aes: fix misuse of strlen on binary data · 8f94f947
    Gianluca Merlo authored
    The encryption code for AES_ENCRYPT evaluates the length of the data to
    be encoded in base64 using strlen. The data is binary, thus the length
    of it can be underestimated at the first NULL character.
    Reuse the write pointer offset to evaluate it, instead.
    
    ASTERISK-25857 #close
    
    Change-Id: If686b5d570473eb926693c73461177b35b13b186
    8f94f947
    History
    func_aes: fix misuse of strlen on binary data
    Gianluca Merlo authored
    The encryption code for AES_ENCRYPT evaluates the length of the data to
    be encoded in base64 using strlen. The data is binary, thus the length
    of it can be underestimated at the first NULL character.
    Reuse the write pointer offset to evaluate it, instead.
    
    ASTERISK-25857 #close
    
    Change-Id: If686b5d570473eb926693c73461177b35b13b186
func_aes.c 5.26 KiB