mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-10-24 03:48:55 +03:00
This adds a new field to sftp_session_struct, containing a list of outstanding request IDs. An ID is added to the list when a request is constructed and removed when the corresponding request is received. If a client receives a response with an unknown request ID, it reports an error. Storing responses with unknown request IDs in the response queue could be abused by a malicious SFTP server which could deplete client memory this way. Signed-off-by: Pavol Žáčik <pzacik@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>