Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libssh: get rid of PATH_MAX #6829

Closed

Conversation

@emilengler
Copy link
Contributor

@emilengler emilengler commented 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.

emilengler added a commit to emilengler/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
@emilengler emilengler force-pushed the emilengler:2021-04-libssh-no-path-max branch from 67b700e to 9a07794 Apr 1, 2021
lib/vssh/libssh.c Outdated Show resolved Hide resolved
emilengler added a commit to emilengler/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
@emilengler emilengler force-pushed the emilengler:2021-04-libssh-no-path-max branch from 9a07794 to bfff6dc Apr 1, 2021
@bagder
bagder approved these changes Apr 1, 2021
Copy link
Member

@bagder bagder left a comment

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.

@emilengler
Copy link
Contributor Author

@emilengler emilengler commented Apr 2, 2021

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 #6829
@emilengler emilengler force-pushed the emilengler:2021-04-libssh-no-path-max branch from bfff6dc to e5e5b3c Apr 4, 2021
@emilengler
Copy link
Contributor Author

@emilengler emilengler commented Apr 4, 2021

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
Copy link
Member

@jay jay commented Apr 6, 2021

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants