util-linux/lib
Sami Kerola bf99940f64 lib/canonicalize: fix truncation warning
lib/canonicalize.c: In function ‘canonicalize_dm_name’:
lib/canonicalize.c:42:45: warning: ‘%s’ directive output may be truncated
writing up to 255 bytes into a region of size 244 [-Wformat-truncation=]
   snprintf(path, sizeof(path), "/dev/mapper/%s", name);

Notice that this warnign fix does not improve code enormously.  The earlier
snprintf() truncation will not happen a bit earlier when fgets() is called.
In that sense this change merely makes one easy to silence warning to
disappear, and therefore improve change of noticing useful messaging as such
crops up.

[kzak@redhat.com: - use macro rather than hardcoded string for mapper path]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-10 11:20:56 +02:00
..
.gitignore build-sys: add parse-date.y 2017-03-04 11:01:56 -05:00
Makemodule.am lib: Add simple crc32c() function 2017-11-16 11:44:39 +01:00
blkdev.c lib/blkdev: remove support for Linux < 2.6 2017-06-29 12:56:22 +02:00
canonicalize.c lib/canonicalize: fix truncation warning 2018-05-10 11:20:56 +02:00
color-names.c lib/color: add more ESC seq. 2016-02-17 12:51:15 +01:00
colors.c include/debug: introduce __UL_INIT_DEBUG_FROM_STRING() 2018-01-17 13:58:29 +01:00
cpuset.c lib: simplify cpuset if clauses that return 2017-06-14 12:22:54 +02:00
crc32.c lib/crc32: prefix public functions 2016-10-19 12:11:59 +02:00
crc32c.c lib: Add simple crc32c() function 2017-11-16 11:44:39 +01:00
env.c lib: remove _RLD_ from forbid environment variable list 2017-06-14 12:23:42 +02:00
exec_shell.c lib/exec_shell: (and pager) use errexec() 2018-02-01 15:38:24 +01:00
fileutils.c lib: use unique ifdefs for tests 2017-01-04 11:44:37 +01:00
idcache.c agetty: fix characters reorder in login prompt 2017-03-27 14:54:39 +02:00
ismounted.c lib: use unique ifdefs for tests 2017-01-04 11:44:37 +01:00
langinfo.c misc: Fix various typos 2016-05-31 23:40:21 +02:00
linux_version.c lib/linux_version: fix code indention 2017-01-04 15:42:02 +01:00
loopdev.c misc: fix typos using codespell 2018-02-16 11:12:52 +01:00
mangle.c lib/mangle: return size of the decoded buffer 2017-11-01 15:33:04 +01:00
match.c lib/match: make match_fstype() case insensitive 2017-08-31 14:15:23 +02:00
mbsalign.c lib/mbsalign: Fix escaping nonprintable multibyte characters 2018-01-11 10:42:22 +01:00
mbsedit.c lib/mbsedit: check wctomb() return code [coverity scan] 2017-10-11 14:40:37 +02:00
md5.c lib/md5: use ul_/UL_ prefix 2017-12-12 12:06:15 +01:00
monotonic.c include: fix sys/sysinfo.h 2016-02-18 16:54:38 +01:00
pager.c lib/exec_shell: (and pager) use errexec() 2018-02-01 15:38:24 +01:00
parse-date.y parse-date: fix printf format 2017-07-18 11:06:52 +02:00
path.c lib/path: make path_set_prefix() independent on cpu_set_t 2017-10-23 15:45:01 +02:00
plymouth-ctrl.c lib: style cosmetics plymouth-ctrl.c 2017-06-15 09:13:04 +02:00
procutils.c lib: use unique ifdefs for tests 2017-01-04 11:44:37 +01:00
pwdutils.c lib/pwdutils: add xgetlogin() 2017-09-18 11:48:56 +02:00
randutils.c lib/randutils: don't break on EAGAIN, use usleep() 2018-03-20 14:17:24 +01:00
setproctitle.c setproctitle: fix out of boundary access 2017-09-26 12:04:41 +02:00
sha1.c lib/sha1: use proper WORDS_BIGENDIAN macro 2018-01-02 11:08:03 +01:00
signames.c lib/signames: remove unused function 2017-11-28 14:39:17 +01:00
strutils.c lib: fix strutils.h, remove STRTOXX_EXIT_CODE 2017-06-22 22:40:12 +02:00
strv.c lib/strv: add strv_extendv() 2015-10-01 14:43:05 +02:00
swapprober.c textual: "ambivalent" applies to intentions, "ambiguous" to results 2014-10-01 09:37:03 +02:00
sysfs.c libblkid: ignore private Stratis devices 2018-03-09 13:34:42 +01:00
terminal-colors.d.5 docs: replace FTP by HTTPS in kernel.org URLs 2016-12-19 11:22:26 +01:00
timer.c lib/timer: add comment 2017-04-28 13:25:41 +02:00
timeutils.c lib/timeutils.c: warn format_iso_time() overflow 2017-12-09 18:43:29 -05:00
ttyutils.c lib/ttyutils: return terminal lines too 2017-06-12 11:38:38 +02:00