Skip to content
Snippets Groups Projects
  • Sean Bright's avatar
    bf7c8086
    func_env: Prevent FILE() from reading garbage at end-of-file · bf7c8086
    Sean Bright authored
    If the last line of a file does not have a terminating EOL sequence, we
    potentially add garbage to the value returned from the FILE() function.
    
    There is no overflow potential here as we are reading from a buffer of a
    known size, we are just reading too much of it.
    
    ASTERISK-26481 #close
    
    Change-Id: I50dd4fcf416fb3c83150040a1a79a59d9eb1ae01
    bf7c8086
    History
    func_env: Prevent FILE() from reading garbage at end-of-file
    Sean Bright authored
    If the last line of a file does not have a terminating EOL sequence, we
    potentially add garbage to the value returned from the FILE() function.
    
    There is no overflow potential here as we are reading from a buffer of a
    known size, we are just reading too much of it.
    
    ASTERISK-26481 #close
    
    Change-Id: I50dd4fcf416fb3c83150040a1a79a59d9eb1ae01
func_env.c 39.54 KiB