pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/www/vimb



Module Name:    pkgsrc
Committed By:   leot
Date:           Sun May 26 20:25:13 UTC 2019

Modified Files:
        pkgsrc/www/vimb: Makefile distinfo
Added Files:
        pkgsrc/www/vimb/patches: patch-src_main.c patch-src_util.c

Log Message:
vimb: Do not crash when opening a new tab via context menu

Backported from upstream commit 79c69ba194db0e4ddfb4ff985bc51c3b14ac8dd3.

PKGREVISION++


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/www/vimb/Makefile
cvs rdiff -u -r1.4 -r1.5 pkgsrc/www/vimb/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/www/vimb/patches/patch-src_main.c \
    pkgsrc/www/vimb/patches/patch-src_util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/www/vimb/Makefile
diff -u pkgsrc/www/vimb/Makefile:1.30 pkgsrc/www/vimb/Makefile:1.31
--- pkgsrc/www/vimb/Makefile:1.30       Wed Apr  3 00:33:13 2019
+++ pkgsrc/www/vimb/Makefile    Sun May 26 20:25:13 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2019/04/03 00:33:13 ryoon Exp $
+# $NetBSD: Makefile,v 1.31 2019/05/26 20:25:13 leot Exp $
 
 DISTNAME=      vimb-3.4.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    www
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=fanglingsu/}
 

Index: pkgsrc/www/vimb/distinfo
diff -u pkgsrc/www/vimb/distinfo:1.4 pkgsrc/www/vimb/distinfo:1.5
--- pkgsrc/www/vimb/distinfo:1.4        Sun Mar 31 20:52:16 2019
+++ pkgsrc/www/vimb/distinfo    Sun May 26 20:25:13 2019
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.4 2019/03/31 20:52:16 leot Exp $
+$NetBSD: distinfo,v 1.5 2019/05/26 20:25:13 leot Exp $
 
 SHA1 (vimb-3.4.0.tar.gz) = 6a179822fd5bb03a4597ffc7267ccd2e8357ad16
 RMD160 (vimb-3.4.0.tar.gz) = a339e8227bbace0004d10f6d36095079559da973
 SHA512 (vimb-3.4.0.tar.gz) = 80586c1ee5836b848a63cb4efd53c4a75fbeede0a3f6ee405b6e145063a17c32c3856af122b6a385cd2283519b86ad480fbf88c978ec0a32830c74d68c95a6ea
 Size (vimb-3.4.0.tar.gz) = 138452 bytes
 SHA1 (patch-Makefile) = 973017a0cc4b2a65535aaa40ae2eb63a4b020acf
+SHA1 (patch-src_main.c) = 127beefbe9cb853a7f2e1b7a0f19d4e87cbc9db3
+SHA1 (patch-src_util.c) = 8794f09aaf86cb2e19372f404e3c60fa1b045505

Added files:

Index: pkgsrc/www/vimb/patches/patch-src_main.c
diff -u /dev/null pkgsrc/www/vimb/patches/patch-src_main.c:1.1
--- /dev/null   Sun May 26 20:25:13 2019
+++ pkgsrc/www/vimb/patches/patch-src_main.c    Sun May 26 20:25:13 2019
@@ -0,0 +1,56 @@
+$NetBSD: patch-src_main.c,v 1.1 2019/05/26 20:25:13 leot Exp $
+
+Backport upstream commit 79c69ba194db0e4ddfb4ff985bc51c3b14ac8dd3.
+
+Fix segfault on open in new tabe from context menu #556.
+
+--- src/main.c.orig    2019-03-26 22:47:03.000000000 +0000
++++ src/main.c
+@@ -1347,17 +1347,22 @@ static void on_webview_load_changed(WebK
+         WebKitLoadEvent event, Client *c)
+ {
+     GTlsCertificateFlags tlsflags;
++    const char *raw_uri;
+     char *uri = NULL;
+ 
++    raw_uri = webkit_web_view_get_uri(webview);
++    if (raw_uri) {
++        uri = util_sanitize_uri(raw_uri);
++    }
++
+     switch (event) {
+         case WEBKIT_LOAD_STARTED:
+ #ifdef FEATURE_AUTOCMD
+-            autocmd_run(c, AU_LOAD_STARTED, webkit_web_view_get_uri(webview), NULL);
++            autocmd_run(c, AU_LOAD_STARTED, raw_uri, NULL);
+ #endif
+             /* update load progress in statusbar */
+             c->state.progress = 0;
+             vb_statusbar_update(c);
+-            uri = util_sanitize_uri(webkit_web_view_get_uri(webview));
+             set_title(c, uri);
+             /* Make sure hinting is cleared before the new page is loaded.
+              * Without that vimb would still be in hinting mode after hinting
+@@ -1379,10 +1384,9 @@ static void on_webview_load_changed(WebK
+              * right place to remove the flag. */
+             c->mode->flags &= ~FLAG_IGNORE_FOCUS;
+ #ifdef FEATURE_AUTOCMD
+-            autocmd_run(c, AU_LOAD_COMMITTED, webkit_web_view_get_uri(webview), NULL);
++            autocmd_run(c, AU_LOAD_COMMITTED, raw_uri, NULL);
+ #endif
+             /* save the current URI in register % */
+-            uri = util_sanitize_uri(webkit_web_view_get_uri(webview));
+             vb_register_add(c, '%', uri);
+             /* check if tls is on and the page is trusted */
+             if (g_str_has_prefix(uri, "https://";)) {
+@@ -1405,9 +1409,8 @@ static void on_webview_load_changed(WebK
+             break;
+ 
+         case WEBKIT_LOAD_FINISHED:
+-            uri = util_sanitize_uri(webkit_web_view_get_uri(webview));
+ #ifdef FEATURE_AUTOCMD
+-            autocmd_run(c, AU_LOAD_FINISHED, webkit_web_view_get_uri(webview), NULL);
++            autocmd_run(c, AU_LOAD_FINISHED, raw_uri, NULL);
+ #endif
+             c->state.progress = 100;
+             if (strncmp(uri, "about:", 6)) {
Index: pkgsrc/www/vimb/patches/patch-src_util.c
diff -u /dev/null pkgsrc/www/vimb/patches/patch-src_util.c:1.1
--- /dev/null   Sun May 26 20:25:13 2019
+++ pkgsrc/www/vimb/patches/patch-src_util.c    Sun May 26 20:25:13 2019
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_util.c,v 1.1 2019/05/26 20:25:13 leot Exp $
+
+Backport upstream commit 79c69ba194db0e4ddfb4ff985bc51c3b14ac8dd3.
+
+Fix segfault on open in new tabe from context menu #556.
+
+--- src/util.c.orig    2019-03-26 22:47:03.000000000 +0000
++++ src/util.c
+@@ -821,7 +821,7 @@ char *util_sanitize_filename(char *filen
+ /**
+  * Strips password from a uri.
+  *
+- * Return newly allocated string.
++ * Return newly allocated string or NULL.
+  */
+ char *util_sanitize_uri(const char *uri_str)
+ {
+@@ -829,6 +829,9 @@ char *util_sanitize_uri(const char *uri_
+     char *sanitized_uri;
+     char *for_display;
+ 
++    if (!uri_str) {
++        return NULL;
++    }
+ #if WEBKIT_CHECK_VERSION(2, 24, 0)
+     for_display = webkit_uri_for_display(uri_str);
+ #else



Home | Main Index | Thread Index | Old Index