~sircmpwn/gmni-devel

fix null dereference v1 APPLIED

Ondřej Fiala: 1
 fix null dereference

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/gmni-devel/patches/28283/mbox | git am -3
Learn more about email & git

[PATCH] fix null dereference Export this patch

---
My previous patch failed to include null check on browser->page_title,
causing null dereference when title is not set. Oops.

 src/gmnlm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index f5b7480..3160327 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -614,7 +614,7 @@ do_prompts(const char *prompt, struct browser *browser)
	case 'm':
		if (in[1] != '\0' && !isspace(in[1])) break;
		char *title = in[1] ? &in[1] : browser->page_title;
		save_bookmark(browser, trim_ws(title));
		save_bookmark(browser, title ? trim_ws(title) : title);
		result = PROMPT_AGAIN;
		goto exit;
	case 'M':
-- 
2.34.1
Thanks!

To git@git.sr.ht:~sircmpwn/gmni
   0603755..b31e655  master -> master