diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-10-13 07:34:49 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-10-13 07:34:49 +0000 |
commit | f4aad6320b745174c0c6b36596a3d38784affa35 (patch) | |
tree | e6fe10710ff6613477a07f9022eb4f18c5763aba /app-editors/mg | |
parent | Backport g++-X.Y header location support. Fixes bug #487584. (diff) | |
download | gentoo-2-f4aad6320b745174c0c6b36596a3d38784affa35.tar.gz gentoo-2-f4aad6320b745174c0c6b36596a3d38784affa35.tar.bz2 gentoo-2-f4aad6320b745174c0c6b36596a3d38784affa35.zip |
Fix dirname(3) call in readin and writeout functions, bug 487758.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 9433907D693FB5B8!)
Diffstat (limited to 'app-editors/mg')
-rw-r--r-- | app-editors/mg/ChangeLog | 6 | ||||
-rw-r--r-- | app-editors/mg/files/mg-20130922-dirname.patch | 23 |
2 files changed, 24 insertions, 5 deletions
diff --git a/app-editors/mg/ChangeLog b/app-editors/mg/ChangeLog index d5f9ebb33b45..b9f610abbc33 100644 --- a/app-editors/mg/ChangeLog +++ b/app-editors/mg/ChangeLog @@ -1,13 +1,13 @@ # ChangeLog for app-editors/mg # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.61 2013/10/13 07:12:45 ulm Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-editors/mg/ChangeLog,v 1.62 2013/10/13 07:34:48 ulm Exp $ *mg-20130922-r1 (13 Oct 2013) 13 Oct 2013; Ulrich Müller <ulm@gentoo.org> -mg-20130922.ebuild, +mg-20130922-r1.ebuild, +files/mg-20130922-dirname.patch: - Fix dirname(3) call in writeout function, bug 487758. Thanks to Marien Zwart - <marienz@gentoo.org>. + Fix dirname(3) call in readin and writeout functions, bug 487758. Thanks to + Marien Zwart <marienz@gentoo.org>. 09 Oct 2013; Ulrich Müller <ulm@gentoo.org> mg-20130922.ebuild: Specify CPPFLAGS not CFLAGS for preprocessor options. Add missing EPREFIX. diff --git a/app-editors/mg/files/mg-20130922-dirname.patch b/app-editors/mg/files/mg-20130922-dirname.patch index c97958948bfe..4c443eeaa921 100644 --- a/app-editors/mg/files/mg-20130922-dirname.patch +++ b/app-editors/mg/files/mg-20130922-dirname.patch @@ -1,9 +1,28 @@ -Fix dirname(3) call in writeout function. +Fix dirname(3) call in readin and writeout functions. https://bugs.gentoo.org/487758 --- mg-20130922-orig/file.c +++ mg-20130922/file.c -@@ -669,11 +669,11 @@ +@@ -210,7 +210,7 @@ + struct stat statbuf; + int status, i, ro = FALSE; + PF *ael; +- char *dp; ++ char ts[NFILEN], *dp; + + /* might be old */ + if (bclear(curbp) != TRUE) +@@ -255,7 +255,8 @@ + if (errno != ENOENT) + ro = TRUE; + else if (errno == ENOENT) { +- dp = dirname(fname); ++ (void)strlcpy(ts, fname, NFILEN); ++ dp = dirname(ts); + if (stat(dp, &statbuf) == -1 && errno == ENOENT) { + /* no read-only; like emacs */ + ewprintf("Use M-x make-directory RET RET to " +@@ -669,11 +670,11 @@ { struct stat statbuf; int s; |