Commit Diff
- Commit:
5c0ab198bd9dc104f8f15969c32d8df70c86e0fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- use NL_TEXTMAX for the strerror_r buffer the strerror_r(3) man page mentions that it returns a message that's up to NL_TEXTMAX bytes long (including the NUL.) strerror_r can fail with ERANGE if the buffer is not large enough, and that's probably the case of some "funny" Rerrors that cage gets from time to time.
- Actions:
- Patch | Tree
--- client.c +++ client.c @@ -724,7 +724,7 @@ static void np_errno(uint16_t tag) { int saved_errno; - char buf[64]; + char buf[NL_TEXTMAX] = {0}; saved_errno = errno;