Skip to content
Snippets Groups Projects
  • neutrino88's avatar
    24cece66
    core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames · 24cece66
    neutrino88 authored
    If a channel creates an AST_TEXT_FRAME with datalen == 0, the ast_frdup()
    and ast_frisolate() functions could create a clone frame with an invalid
    data.ptr which would cause a crash.  The proposed fix is to make sure that
    for such empty text frames, ast_frdup() and ast_frisolate() return cloned
    text frames with a valid data.ptr.
    
    ASTERISK-28076
    Reported by: Emmanuel BUU
    Tested by: Emmanuel BUU
    
    Change-Id: Ib882dd028598f13c4c233edbfdd7e54ad44a68e9
    24cece66
    History
    core/frame: Fix ast_frdup() and ast_frisolate() for empty text frames
    neutrino88 authored
    If a channel creates an AST_TEXT_FRAME with datalen == 0, the ast_frdup()
    and ast_frisolate() functions could create a clone frame with an invalid
    data.ptr which would cause a crash.  The proposed fix is to make sure that
    for such empty text frames, ast_frdup() and ast_frisolate() return cloned
    text frames with a valid data.ptr.
    
    ASTERISK-28076
    Reported by: Emmanuel BUU
    Tested by: Emmanuel BUU
    
    Change-Id: Ib882dd028598f13c4c233edbfdd7e54ad44a68e9