Skip to content

libssh: get rid of PATH_MAX - #6829

Closed
cvengler wants to merge 1 commit into
curl:masterfrom
cvengler:2021-04-libssh-no-path-max
Closed

cvengler wants to merge 1 commit into
curl:masterfrom
cvengler:2021-04-libssh-no-path-max

Conversation

@cvengler

@cvengler cvengler commented Apr 1, 2021

Copy link
Copy Markdown

This removes the last occurrence of PATH_MAX inside our libssh
implementation by calculating the path length from the string length of
the two components.

@cvengler
cvengler force-pushed the 2021-04-libssh-no-path-max branch from 67b700e to 9a07794 Compare April 1, 2021 16:34
Comment thread lib/vssh/libssh.c Resolved
cvengler pushed a commit to cvengler/curl that referenced this pull request Apr 1, 2021
This removes the last occurrence of PATH_MAX inside our libssh
implementation by calculating the path length from the string length of
the two components.

Closes curl#6829
@cvengler
cvengler force-pushed the 2021-04-libssh-no-path-max branch from 9a07794 to bfff6dc Compare April 1, 2021 19:17

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you try switching to aprintf() instead of malloc + snprintf ? That can avoid having strlens and strings in two places risk at some point deviate when code changes over time.

@cvengler

cvengler commented Apr 2, 2021

Copy link
Copy Markdown
Author

Did you try switching to aprintf() instead of malloc + snprintf ? That can avoid having strlens and strings in two places risk at some point deviate when code changes over time.

Not yet, I will have a deeper look at it this evening. So far I only focused on getting rid of PATH_MAX due to various reasons

This removes the last occurrence of PATH_MAX inside our libssh
implementation by calculating the path length from the string length of
the two components.

Closes curl#6829
@cvengler
cvengler force-pushed the 2021-04-libssh-no-path-max branch from bfff6dc to e5e5b3c Compare April 4, 2021 11:08
@cvengler

cvengler commented Apr 4, 2021

Copy link
Copy Markdown
Author

Hey, sorry that Friday evening evolved into Sunday noon. I adjusted the patch to use aprintf(). I think this is ready to be merged.

@jay jay closed this in c1abc66 Apr 6, 2021
@jay

jay commented Apr 6, 2021

Copy link
Copy Markdown
Member

Thanks

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.

3 participants