From 54282733655ddca61a8c1af38b54d583b6c69697 Mon Sep 17 00:00:00 2001 From: Xin LI Date: Wed, 31 Jul 2013 07:09:35 +0000 Subject: [PATCH] Make two buffer variables static for now. It is not safe to reference stack memory after return. MFC after: 2 weeks --- sbin/swapon/swapon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/swapon/swapon.c b/sbin/swapon/swapon.c index 5dcb18d823a4..d93277c6638b 100644 --- a/sbin/swapon/swapon.c +++ b/sbin/swapon/swapon.c @@ -446,7 +446,7 @@ swap_on_off_md(const char *name, char *mntops, int doingall) FILE *sfd; int fd, mdunit, error; const char *ret; - char mdpath[PATH_MAX], linebuf[PATH_MAX]; + static char mdpath[PATH_MAX], linebuf[PATH_MAX]; char *p, *vnodefile; size_t linelen; u_long ul;