-
Notifications
You must be signed in to change notification settings - Fork 55
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
Fix NodeService::setIdentity(..)
.
#175
Conversation
I don't think this is a typo. Is something not working for you? We perform this check so that one doesn't accidentally write too much data into the internal string buffer. |
@joseph-henry I was not able to use this function. I created a new key pair with the lib, and the code always returned an error. if (keypair == NULL || len < ZT_IDENTITY_STRING_BUFFER_LENGTH) {
return ZTS_ERR_ARG;
} I understood it like this:
But why should the second part be an error? Isn't it only an error, if the provided length is larger than the max. buffer size available? I think it's ok, if the length was smaller or equal than the maximal buffer length. |
But yeah! I was also really wondering, because that would mean that nobody ever used this function so far. But maybe I really missed something here. |
Heh. Checking test/selftest.c I have testing for |
looks like nothing changed in test/selftest.c since many years.. it's somehow a bit scary that you only uncommented the return of the error - in June 2023... |
I hope that you simply just don't release your real tests. |
Sorry not sure why this got closed and never properly fixed. And also, yes it looks like that was commented out to get around an issue while developing Pylon but erroneously got included in a commit. I've now included a check so that all buffers must be exactly Thanks for pointing this out and sorry it too so long to fix. |
I think there was a typo here.