Thanks Mattias!
Your patch has been submitted upstream, the PR [1] is now merged so I
backported it as a debian patch [2]. I'll soon upload the new version if
everything is fine.
/Nicolas
[1] https://github.com/libssh2/libssh2/pull/1415
[2]
https://salsa.debian.org/debian/libssh2/-/blob/mas
The correct fix is to not assume a maximum length for paths, but use
dynamic allocation with the proper length.
One way to do this can be seen in the attached patch (calling snprintf
twics).
Another options is to calculate the needed length by adding up the
strlen() result for each of the strings
2 matches
Mail list logo