summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-12-24 13:46:54 +0000
committerjilles <jilles@FreeBSD.org>2013-12-24 13:46:54 +0000
commit20e995f743034e96cbe02143d36c4e9e75acbc36 (patch)
tree0fdca9611836f4932cd76c8677e3d2c686d5b07d /sbin
parent7baf16ac14527f7b4c82b97af31a5aa6df0e958f (diff)
downloadFreeBSD-src-20e995f743034e96cbe02143d36c4e9e75acbc36.zip
FreeBSD-src-20e995f743034e96cbe02143d36c4e9e75acbc36.tar.gz
MFC r259677: swapon: Fix buffer overflow when configuring swap on GBDE.
PR: bin/184950
Diffstat (limited to 'sbin')
-rw-r--r--sbin/swapon/swapon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c
index bf621c1..5c6086d 100644
--- a/sbin/swapon/swapon.c
+++ b/sbin/swapon/swapon.c
@@ -266,7 +266,8 @@ static const char *
swap_on_off_gbde(const char *name, int doingall)
{
const char *ret;
- char pass[64 * 2 + 1], bpass[64];
+ char pass[64 * 2 + 1];
+ unsigned char bpass[64];
char *dname;
int i, error;
OpenPOWER on IntegriCloud