Skip to content

Fix wolfSSH_SFTPNAME_readdir with FATFS#973

Open
J-Goldacker wants to merge 2 commits into
wolfSSL:masterfrom
HOPPECKE-Systemtechnik:fix-wolfSSH_SFTPNAME_readdir-with-fatfs
Open

Fix wolfSSH_SFTPNAME_readdir with FATFS#973
J-Goldacker wants to merge 2 commits into
wolfSSL:masterfrom
HOPPECKE-Systemtechnik:fix-wolfSSH_SFTPNAME_readdir-with-fatfs

Conversation

@J-Goldacker
Copy link
Copy Markdown

This PR fixes the following issues for wolfSSH_SFTPNAME_readdir with FATFS:

  • f_readdir returns FR_OK with empty string in fname when there is no directory entry left
  • wolfSSH_SFTPNAME_free would crash because of a double free in case wolfSSH_SFTPNAME_readdir returns an error and frees fName without setting it to NULL

otherwise wolfSSH_SFTPNAME_free would crash afterwards
@wolfSSL-Bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

@dgarske
Copy link
Copy Markdown
Member

dgarske commented May 12, 2026

Hi @J-Goldacker , no contributor agreement on file. Assigning to @ejohnstown to review and make recommendation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants