On 2015/10/03 09:41, Daniel Jakots wrote:
> Here's an update to the latest stable release. My really light testing
> discovered a use after free. Thanks Quentin Rameau for providing a
> patch for it (committed upstream now).
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/editors/joe/Makefile,v
> retrieving revision 1.44
> diff -u -p -r1.44 Makefile
> --- Makefile 25 Aug 2015 13:18:25 -0000 1.44
> +++ Makefile 3 Oct 2015 07:24:52 -0000
> @@ -3,10 +3,9 @@
>
> COMMENT= Joe's Own Editor
>
> -DISTNAME= joe-4.0
> +DISTNAME= joe-4.1
> CATEGORIES= editors
> MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=joe-editor/}
> -REVISION= 0
>
> HOMEPAGE= http://joe-editor.sourceforge.net/
>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/editors/joe/distinfo,v
> retrieving revision 1.9
> diff -u -p -r1.9 distinfo
> --- distinfo 31 Mar 2015 12:26:40 -0000 1.9
> +++ distinfo 3 Oct 2015 07:24:52 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (joe-4.0.tar.gz) = xVat/3f9l78bhhmN5suC4Lks2hhXnE/vbIO2CNLtKRU=
> -SIZE (joe-4.0.tar.gz) = 838783
> +SHA256 (joe-4.1.tar.gz) = gWIRsr2VH3kt42Aq/XTqS1FhL//dm8JKeAhmAFP+9ts=
> +SIZE (joe-4.1.tar.gz) = 1292957
> Index: patches/patch-src_use_after_free
> ===================================================================
> RCS file: patches/patch-src_use_after_free
> diff -N patches/patch-src_use_after_free
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_use_after_free 3 Oct 2015 07:24:52 -0000
> @@ -0,0 +1,16 @@
> +Committed upstream
> +
> +
> http://sourceforge.net/p/joe-editor/mercurial/ci/e26894707ac52a56d02c55af6e412d8fd96df94d/#diff-2
> +
> +--- joe/main.c.orig Fri Oct 2 19:36:29 2015
> ++++ joe/main.c Fri Oct 2 19:36:52 2015
> +@@ -211,7 +211,7 @@ int edloop(int flg)
> + }
> +
> + /* Restore modes */
> +- if (maint->curwin->watom->what & TYPETW) {
> ++ if (!leave && maint->curwin->watom->what & TYPETW) {
> + bw = (BW *)maint->curwin->object;
> +
> + if (auto_off) {
> +
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/editors/joe/pkg/PLIST,v
> retrieving revision 1.15
> diff -u -p -r1.15 PLIST
> --- pkg/PLIST 31 Mar 2015 12:26:40 -0000 1.15
> +++ pkg/PLIST 3 Oct 2015 07:24:52 -0000
> @@ -4,8 +4,6 @@ bin/jmacs
> bin/jpico
> bin/jstar
> bin/rjoe
> -@bin bin/stringify
> -@bin bin/termidx
> @man man/man1/joe.1
> man/ru/
> man/ru/man1/
> @@ -27,6 +25,7 @@ share/examples/joe/jmacsrc
> @sample ${SYSCONFDIR}/joe/jmacsrc
> share/examples/joe/joerc
> @sample ${SYSCONFDIR}/joe/joerc
> +share/examples/joe/joerc.zh_TW
> share/examples/joe/jpicorc
> @sample ${SYSCONFDIR}/joe/jpicorc
The new files under /usr/local/share/examples will want @sample'ing
into ${SYSCONFDIR}
> share/examples/joe/jstarrc
> @@ -50,6 +49,7 @@ share/joe/lang/ru.po
> @sample ${SYSCONFDIR}/joe/lang/ru.po
> share/joe/lang/uk.po
> @sample ${SYSCONFDIR}/joe/lang/uk.po
> +share/joe/lang/zh.po
OTOH, I'm surprised that the files in /usr/local/share/joe/ are
@sample'd (including the existing ones), given the directory names
I'd expect it to pick these up directly. Probably worth trying to
remove those and see if it still works.
> share/joe/syntax/
> @sample ${SYSCONFDIR}/joe/syntax/
> share/joe/syntax/4gl.jsf
> @@ -60,14 +60,17 @@ share/joe/syntax/ant.jsf
> @sample ${SYSCONFDIR}/joe/syntax/ant.jsf
> share/joe/syntax/asm.jsf
> @sample ${SYSCONFDIR}/joe/syntax/asm.jsf
> +share/joe/syntax/avr.jsf
> share/joe/syntax/awk.jsf
> @sample ${SYSCONFDIR}/joe/syntax/awk.jsf
> share/joe/syntax/batch.jsf
> @sample ${SYSCONFDIR}/joe/syntax/batch.jsf
> share/joe/syntax/c.jsf
> @sample ${SYSCONFDIR}/joe/syntax/c.jsf
> +share/joe/syntax/clojure.jsf
> share/joe/syntax/cobol.jsf
> @sample ${SYSCONFDIR}/joe/syntax/cobol.jsf
> +share/joe/syntax/coffee.jsf
> share/joe/syntax/comment_todo.jsf
> @sample ${SYSCONFDIR}/joe/syntax/comment_todo.jsf
> share/joe/syntax/conf.jsf
> @@ -78,6 +81,7 @@ share/joe/syntax/csharp.jsf
> @sample ${SYSCONFDIR}/joe/syntax/csharp.jsf
> share/joe/syntax/css.jsf
> @sample ${SYSCONFDIR}/joe/syntax/css.jsf
> +share/joe/syntax/d.jsf
> share/joe/syntax/debian.jsf
> @sample ${SYSCONFDIR}/joe/syntax/debian.jsf
> share/joe/syntax/diff.jsf
> @@ -96,6 +100,7 @@ share/joe/syntax/git-commit.jsf
> @sample ${SYSCONFDIR}/joe/syntax/git-commit.jsf
> share/joe/syntax/go.jsf
> @sample ${SYSCONFDIR}/joe/syntax/go.jsf
> +share/joe/syntax/groovy.jsf
> share/joe/syntax/haml.jsf
> @sample ${SYSCONFDIR}/joe/syntax/haml.jsf
> share/joe/syntax/haskell.jsf
> @@ -154,10 +159,13 @@ share/joe/syntax/puppet.jsf
> @sample ${SYSCONFDIR}/joe/syntax/puppet.jsf
> share/joe/syntax/python.jsf
> @sample ${SYSCONFDIR}/joe/syntax/python.jsf
> +share/joe/syntax/r.jsf
> share/joe/syntax/rexx.jsf
> @sample ${SYSCONFDIR}/joe/syntax/rexx.jsf
> share/joe/syntax/ruby.jsf
> @sample ${SYSCONFDIR}/joe/syntax/ruby.jsf
> +share/joe/syntax/rust.jsf
> +share/joe/syntax/scala.jsf
> share/joe/syntax/sed.jsf
> @sample ${SYSCONFDIR}/joe/syntax/sed.jsf
> share/joe/syntax/sh.jsf
> @@ -172,6 +180,7 @@ share/joe/syntax/spec.jsf
> @sample ${SYSCONFDIR}/joe/syntax/spec.jsf
> share/joe/syntax/sql.jsf
> @sample ${SYSCONFDIR}/joe/syntax/sql.jsf
> +share/joe/syntax/swift.jsf
> share/joe/syntax/tcl.jsf
> @sample ${SYSCONFDIR}/joe/syntax/tcl.jsf
> share/joe/syntax/tex.jsf
>