summaryrefslogtreecommitdiffstats
path: root/sys/fs/procfs
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-06-11 19:27:21 +0000
committeravg <avg@FreeBSD.org>2010-06-11 19:27:21 +0000
commit324886002f85f17304dae0b8970911d2c9f1a6f4 (patch)
tree2f7c2ec32c10d5bc3aea11e8861a695b7dd807b2 /sys/fs/procfs
parenta674331779d7d47acd30342c7763589ace0b1fea (diff)
downloadFreeBSD-src-324886002f85f17304dae0b8970911d2c9f1a6f4.zip
FreeBSD-src-324886002f85f17304dae0b8970911d2c9f1a6f4.tar.gz
fix a few cases where a string is passed via format argument instead of
via %s Most of the cases looked harmless, but this is done for the sake of correctness. In one case it even allowed to drop an intermediate buffer. Found by: clang MFC after: 2 week
Diffstat (limited to 'sys/fs/procfs')
-rw-r--r--sys/fs/procfs/procfs_type.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/procfs/procfs_type.c b/sys/fs/procfs/procfs_type.c
index c19bf9d..80cecc5 100644
--- a/sys/fs/procfs/procfs_type.c
+++ b/sys/fs/procfs/procfs_type.c
@@ -48,9 +48,9 @@ procfs_doproctype(PFS_FILL_ARGS)
static const char *none = "Not Available";
if (p != NULL && p->p_sysent && p->p_sysent->sv_name)
- sbuf_printf(sb, p->p_sysent->sv_name);
+ sbuf_printf(sb, "%s", p->p_sysent->sv_name);
else
- sbuf_printf(sb, none);
+ sbuf_printf(sb, "%s", none);
sbuf_putc(sb, '\n');
return (0);
}
OpenPOWER on IntegriCloud