mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
better check of snprintf result
This commit is contained in:
parent
40b685b70d
commit
93046479ae
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user