glusterfs/contrib/fuse-util
Yaniv Kaul a2c562eb40 {mount-common|fusermount|mount_darwin|umountd}.c: strncpy()->sprintf(), reduce strlen()'s
strncpy may not be very efficient for short strings copied into
a large buffer: If the length of src is less than n,
strncpy() writes additional null bytes to dest to ensure
that a total of n bytes are written.

Instead, use snprintf().

Also:
- save the result of strlen() and re-use it when possible.
- move from strlen to SLEN (sizeof() ) for const strings.

Compile-tested only!

Change-Id: I369209b36d8356c3fe00d32f8bf56e74cf9963db
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
2018-08-24 16:26:36 +00:00
..
COPYING bring in fusermount 2009-08-12 06:26:31 -07:00
fusermount.c {mount-common|fusermount|mount_darwin|umountd}.c: strncpy()->sprintf(), reduce strlen()'s 2018-08-24 16:26:36 +00:00
Makefile.am build: MacOSX Porting fixes 2014-04-24 14:41:48 -07:00
mount_util.c fuse: reorganize mounting code 2012-05-21 13:47:41 -07:00