Skip to content
Commit 2511cd0b authored by Martin Stava's avatar Martin Stava Committed by Eric Van Hensbergen
Browse files

9p: fix readlink



I do not know if you've looked on the patch, but unfortunately it is
incorrect. A suggested better version is in this email (the old
version didn't work in case the user provided buffer was not long
enough - it incorrectly appended null byte on a position of last char,
and thus broke the contract of the readlink method). However, I'm
still not sure this is 100% correct thing to do, I think readlink is
supposed to return buffer without last null byte in all cases, but we
do return last null byte (even the old version).. on the other hand it
is likely unspecified what is in the remaining part of the buffer, so
null character may be fine there ;):

Signed-off-by: default avatarMartin Stava <martin.stava@gmail.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent f91b9099
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment