Closed degasus closed 1 year ago
Yeah, I see what you're saying. But I wouldn't worry about updating the unit tests, other than to perhaps set a better example.
The bigger problem is that I put this off to figure out what to do about the different sizes across different platforms, and never got back to it. On Linux the size is 108, but on other platforms the buffer size is different: 104, 110, 92, etc. I didn't want to limit it to the smallest size from an obscure platform, but wanted to figure out something more portable.
Indeed, I agree about the tests....
What do you think about using sizeof(sockaddr_un::sun_path)
?
Well, took a few years, but the update is in the develop branch!
Thanks for the fix and for the update. Honestly, I totally forgot about this, but I'm glad that it made it in :-)
In Release v0.8.1
The definition of the struct
Allows a path with up to 108 characters. If all chars are used, there is no null termination. So all accessors of this path should check for the size: