From: Colin Leroy Date: Mon, 16 Nov 2015 09:04:16 +0000 (+0100) Subject: Fix bug #3563 (URL parser will read out of bounds when closing bracket is missing... X-Git-Tag: 3.13.1~45 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=2a2a1bd7db0949e1763661b6098b31a6cd82f617 Fix bug #3563 (URL parser will read out of bounds when closing bracket is missing in get_url_part) Patch by Hanno Boeck --- diff --git a/src/mainwindow.c b/src/mainwindow.c index c51bbc6e3..fe436a75a 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -3503,6 +3503,11 @@ static void get_url_part (const gchar **buffer, gchar *url_decoded) for (i = 0; *buf != '>' && *buf != 0x00 && i < BUFFSIZE; tmp[i++] = *(buf++)); + if (*buf == 0) { + *buffer = NULL; + *url_decoded = '\0'; + return; + } buf++; } else {