From 93046479aeb4f10075afdbadf1c7e8c0fb327372 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Fri, 11 Oct 2002 02:51:09 +0000 Subject: [PATCH] better check of snprintf result --- libraries/liblutil/uuid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- 2.39.5