Skip to content
  • Filip Roséen's avatar
    realrtsp: fixed crash on unsuccessful DESCRIBE-response that includes `Alert` · 859d6f63
    Filip Roséen authored and Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf committed
    
    
    If the remote server yields an error on the `DESCRIBE` request, while
    also including an error message the module would crash due to an invalid
    free.
    
    % netcat -l -p 8080 <<EOF
    > RTSP/1.0 200 OK
    > CSeq: 1
    > Server: Real
    > RealChallenge1: DEADBEEF
    >
    > RTSP/1.0 199 OK
    > CSeq: 2
    > Alert: I like turtles
    >
    EOF
    
    The reason being that `alert` will point to the middle of allocated
    memory. Given the sourroundings the original author probably forgot to
    `strdup` the message - even though that is very unnecessary.
    
    Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
    859d6f63