mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 21:52:39 +00:00
fix(x11/nemo): null-terminate splitter in nemo_main_application_open()
- Fixes https://github.com/termux/termux-packages/issues/26982 - GLib documentation states that `g_strsplit()` should take null-terminated `gchar*` as arguments, not a pointer to an individual `char`. https://docs.gtk.org/glib/func.strsplit.html
This commit is contained in:
23
x11-packages/nemo/0005-null-terminate-splitter.patch
Normal file
23
x11-packages/nemo/0005-null-terminate-splitter.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
Fixes https://github.com/termux/termux-packages/issues/26982
|
||||
g_strsplit() takes arguments as null-terminated gchar*, not pointer to individual char
|
||||
https://docs.gtk.org/glib/func.strsplit.html
|
||||
|
||||
--- a/src/nemo-main-application.c
|
||||
+++ b/src/nemo-main-application.c
|
||||
@@ -533,14 +533,14 @@ nemo_main_application_open (GApplication *app,
|
||||
gboolean open_in_tabs = FALSE;
|
||||
gchar *geometry = NULL;
|
||||
gboolean open_in_existing_window = strcmp (options, "EXISTING_WINDOW") == 0;
|
||||
- const char splitter = '=';
|
||||
+ gchar splitter[2] = {'=', '\0'};
|
||||
|
||||
g_debug ("Open called on the GApplication instance; %d files", n_files);
|
||||
|
||||
if (!open_in_existing_window) {
|
||||
/* Check if local command line passed --geometry or --tabs */
|
||||
if (strlen (options) > 0) {
|
||||
- gchar** split_options = g_strsplit (options, &splitter, 2);
|
||||
+ gchar** split_options = g_strsplit (options, splitter, 2);
|
||||
if (strcmp (split_options[0], "NULL") != 0) {
|
||||
geometry = g_strdup (split_options[0]);
|
||||
}
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Cinnamon File manager"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="6.4.5"
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL="https://github.com/linuxmint/nemo/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz"
|
||||
TERMUX_PKG_SHA256=06dc3c7884dc0ec8ce4d55ed48f0cd77cbf7bd6be5dba9ed883d49a43118ebdf
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
Reference in New Issue
Block a user