Re: [PATCH] nbd: Avoid off-by-one in long export name truncation

2020-06-23 Thread Vladimir Sementsov-Ogievskiy
23.06.2020 00:03, Eric Blake wrote: When snprintf returns the same value as the buffer size, the final byte was truncated to ensure a NUL terminator. Fortunately, such long export names are unusual enough, with no real impact other than what is displayed to the user. Fixes: 5c86bdf12089 Oh, I

[PATCH] nbd: Avoid off-by-one in long export name truncation

2020-06-22 Thread Eric Blake
When snprintf returns the same value as the buffer size, the final byte was truncated to ensure a NUL terminator. Fortunately, such long export names are unusual enough, with no real impact other than what is displayed to the user. Fixes: 5c86bdf12089 Reported-by: Max Reitz Signed-off-by: Eric B