talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 2a2a1bd7db0949e1763661b6098b31a6cd82f617
parent 2d95171a97d46817e1e413b3d0a77b92072cc034
Author: Colin Leroy <colin@colino.net>
Date:   Mon, 16 Nov 2015 10:04:16 +0100

Fix bug #3563 (URL parser will read out of bounds when closing bracket is missing in get_url_part)
Patch by Hanno Boeck

Diffstat:
Msrc/mainwindow.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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 {