Related to #3151 and #3149.
The `NULL` check in `vte_send_cmd()` is just for feeling more safe, the main change is to consider `vc->send_cmd_prefix` being `NULL` when constructing the command to be executed when we want to change the directory in the VTE. This should not happen but it might. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3153
-- Commit Summary --
* VTE: Fix crash when "send_cmd_prefix" is NULL
-- File Changes --
M src/vte.c (5)
-- Patch Links --
https://github.com/geany/geany/pull/3153.patch https://github.com/geany/geany/pull/3153.diff
@eht16 pushed 1 commit.
ec9cd86fff88baecbd74840033d1e562662d3913 VTE: Fix crash when "send_cmd_prefix" is NULL
Obsoleted by #3156 (IMO)
Having this patch active I didn't see further crashes hitting e.g. f5 most likely caused by in thix context unset send_cmd_prefix
Obsoleted by #3156 (IMO)
Not necessarily I'd say. I think the guards here are useful anyway. True, it should not happen that `vte_config.send_cmd_prefix` is `NULL` and that any caller should pass `NULL` to `vte_send_cmd` but still it might happen and Geany should not crash then.
But we aren't going to augment every pref in case garbage is read from geany.conf, do we?
No, of course not. But since we now know that `vte_config.send_cmd_prefix` might lead to crashes when it is `NULL` for whatever reasons, checking it makes it not worse, IMO.
I'm not blocking, go ahead if you think it's worthwhile
@eht16 ping, still complaints about this problem, see #3190
@eht16 pushed 1 commit.
af7582d137dfaf407ba47b085bca721a5eb6cf00 VTE: Fix crash when "send_cmd_prefix" is NULL
Just fixed the merge conflict. If there are no objections, let's merge it.
LGTM
Merged #3153 into master.
github-comments@lists.geany.org