From: Kurt Zeilenga Date: Fri, 11 Oct 2002 02:51:09 +0000 (+0000) Subject: better check of snprintf result X-Git-Tag: NO_SLAP_OP_BLOCKS~892 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93046479aeb4f10075afdbadf1c7e8c0fb327372;p=openldap better check of snprintf result --- diff --git a/libraries/liblutil/uuid.c b/libraries/liblutil/uuid.c index 81be614358..d85f6f139a 100644 --- a/libraries/liblutil/uuid.c +++ b/libraries/liblutil/uuid.c @@ -273,7 +273,7 @@ lutil_uuidstr( char *buf, size_t len ) (unsigned) nl[2], (unsigned) nl[3], (unsigned) nl[4], (unsigned) nl[5] ); - return (t1 < len) ? t1 : 0; + return (0 < t1 && t1 < len) ? t1 : 0; #endif }