summaryrefslogtreecommitdiffstats
path: root/sbin/swapon/swapon.c
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-12-21 11:59:58 +0000
committerjilles <jilles@FreeBSD.org>2013-12-21 11:59:58 +0000
commita28caa47773496c9082609750d9de7f1a197396a (patch)
treeb259a758e8e2234945354739b2129d298241ede8 /sbin/swapon/swapon.c
parent5da3574e724e097bde8ffb8d9bad07e178f3ac28 (diff)
downloadFreeBSD-src-a28caa47773496c9082609750d9de7f1a197396a.zip
FreeBSD-src-a28caa47773496c9082609750d9de7f1a197396a.tar.gz
swapon: Fix buffer overflow when configuring encrypted swap on GBDE.
PR: bin/184950 Tested by: Radim Kolar MFC after: 3 days
Diffstat (limited to 'sbin/swapon/swapon.c')
-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