svn commit: r253834 - head/sbin/swapon
Xin LI
delphij at FreeBSD.org
Wed Jul 31 07:09:36 UTC 2013
Author: delphij
Date: Wed Jul 31 07:09:35 2013
New Revision: 253834
URL: http://svnweb.freebsd.org/changeset/base/253834
Log:
Make two buffer variables static for now. It is not safe to
reference stack memory after return.
MFC after: 2 weeks
Modified:
head/sbin/swapon/swapon.c
Modified: head/sbin/swapon/swapon.c
==============================================================================
--- head/sbin/swapon/swapon.c Wed Jul 31 07:06:58 2013 (r253833)
+++ head/sbin/swapon/swapon.c Wed Jul 31 07:09:35 2013 (r253834)
@@ -446,7 +446,7 @@ swap_on_off_md(const char *name, char *m
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;
More information about the svn-src-head
mailing list