st-flexipatch

My st-flexipatch configuration
git clone git://git.ethandl.dev/st-flexipatch
Log | Files | Refs | README | LICENSE

commit 1fab5f6e4f303ab1d065c9b08c3db39bcad768f9
parent d50ebeef66cde93d440d027d0459d9fa3a923e33
Author: Stein Gunnar Bakkeby <bakkeby@gmail.com>
Date:   Tue,  3 Aug 2021 17:51:57 +0200

Merge pull request #39 from Hejsil/fix-buffer-overflows-in-openurl-patch

Fix buffer overflows in openurlonclick.c
Diffstat:
Mpatch/openurlonclick.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/patch/openurlonclick.c b/patch/openurlonclick.c @@ -46,13 +46,14 @@ openUrlOnClick(int col, int row, char* url_opener) col_start = 0; row_start++; } - } while (row_start != row_end || col_start != col_end); + } while (url_index < (sizeof(url)-1) && + (row_start != row_end || col_start != col_end)); if (strncmp("http", url, 4) != 0) { return; } - char command[strlen(url_opener)+1+strlen(url)]; + char command[strlen(url_opener)+strlen(url)+2]; sprintf(command, "%s %s", url_opener, url); system(command); -} -\ No newline at end of file +}