Skip to content

libssh2: put the readdir buffers into struct - #15285

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/readdir-buffers
Closed

libssh2: put the readdir buffers into struct#15285
bagder wants to merge 2 commits into
masterfrom
bagder/readdir-buffers

Conversation

@bagder

@bagder bagder commented Oct 13, 2024

Copy link
Copy Markdown
Member

... instead of separate malloc() calls:

  • removes two mallocs (and associated error handling paths)
  • makes cleanup easier

Also reduce maximum SFTP file path lengths to 1024 bytes universally everywhere. Using the system's own MAX_PATH did not make sense since this is mostly about getting a remote file name.

... instead of separate malloc() calls:

- removes two mallocs (and associated error handling paths)
- makes cleanup easier

Also reduce maximum SFTP file path lengths to 1024 bytes universally
everywhere. Using the system's own MAX_PATH did not make sense since
this is mostly about getting a remote file name.

Closes #15285
@bagder
bagder force-pushed the bagder/readdir-buffers branch from 9545954 to 99dbbc0 Compare October 15, 2024 22:03
Avoids having to use a big stack buffer for this.
@bagder bagder closed this in 083b4ab Oct 16, 2024
bagder added a commit that referenced this pull request Oct 16, 2024
Avoids having to use a big stack buffer for this.

Closes #15285
@bagder
bagder deleted the bagder/readdir-buffers branch October 16, 2024 09:56
@vszakats

Copy link
Copy Markdown
Member

With this patch, a vcpkg jobs using libssh fails with:

D:\a\curl\curl\lib\vssh\libssh.c(2149,37): error C2065: 'PATH_MAX': undeclared identifier

https://github.com/curl/curl/actions/runs/11366969951/job/31618594231?pr=15307#step:9:28

bagder added a commit that referenced this pull request Oct 16, 2024
Follow-up to facf59c

Reported-by: Viktor Szakats
Bug: #15285 (comment)
bagder added a commit that referenced this pull request Oct 16, 2024
Follow-up to facf59c

Reported-by: Viktor Szakats
Bug: #15285 (comment)
Closes #15309
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
... instead of separate malloc() calls:

- removes two mallocs (and associated error handling paths)
- makes cleanup easier

Also reduce maximum SFTP file path lengths to 1024 bytes universally
everywhere. Using the system's own MAX_PATH did not make sense since
this is mostly about getting a remote file name.

Closes curl#15285
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Avoids having to use a big stack buffer for this.

Closes curl#15285
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Follow-up to facf59c

Reported-by: Viktor Szakats
Bug: curl#15285 (comment)
Closes curl#15309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants