]> git.sur5r.net Git - openldap/commitdiff
fix snprintf result handling
authorKurt Zeilenga <kurt@openldap.org>
Fri, 11 Oct 2002 19:18:00 +0000 (19:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 11 Oct 2002 19:18:00 +0000 (19:18 +0000)
libraries/liblutil/uuid.c

index 81be614358f0516971a6b2973d339a6fbb6a06a8..d85f6f139ab2e5e04efb9b57f4ae5aa54a8b9f29 100644 (file)
@@ -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
 }