From: Timo Teräs Date: Wed, 19 Feb 2014 07:40:35 +0000 (+0200) Subject: fix confstr return value X-Git-Tag: v1.1.0~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0a8d98285f46f721dabf38485df916c02d6a4675;p=oweals%2Fmusl.git fix confstr return value per the specification, the terminating null byte is counted. --- diff --git a/src/conf/confstr.c b/src/conf/confstr.c index 4332f726..6e9c23a0 100644 --- a/src/conf/confstr.c +++ b/src/conf/confstr.c @@ -13,5 +13,5 @@ size_t confstr(int name, char *buf, size_t len) } // snprintf is overkill but avoid wasting code size to implement // this completely useless function and its truncation semantics - return snprintf(buf, len, "%s", s); + return snprintf(buf, len, "%s", s) + 1; }