Commit graph

367 commits

Author SHA1 Message Date
Rego Borsodi
59f1b0da64
Fix passing arguments in hstrnotiocsti (#527) 2025-01-26 22:17:10 +01:00
Martin Dvorak
151aaacb2a 2024 > 2025 2025-01-26 22:03:41 +01:00
Martin Dvorak
13df3bf166 Fixing no TIOCSTI function for Bash which resolves #485 + getting ready for 3.1.0 release 2023-04-18 23:10:27 +02:00
Martin Dvorak
ce3c1482f8 Polishing changelog. 2023-04-15 18:06:42 +02:00
Martin Dvorak
2665ea6033 Initial HSTR version which works w/o TIOCSTI #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
83e7d6ce1a Adding Bash shell script #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
611eecbae8 WIP w/o TIOCSTIO: bash OK, zsh PROBLEM; 3.0.0 version file changes. 2023-04-15 18:06:42 +02:00
Martin Dvorak
07298947a7 Bash install code is not printed dynamically based on TIOCSTI availability + OS (WSL/CYGWIN/...) #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
6d5f50ffb6 Fixed TIOCSTI probe so that it does not pushes char(s) to prompt + y/n status #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
451758c0c1 Adding --is-tiocsti parameter (injects in prompt, which is undesired), updating year to 2023, removing WIP defines for TIOCSTI debugging #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
83560c473b Adding LINUX_KERNEL_6 compiler DEFINE to use __CYGWIN__ workaround for missing TIOCSTI #478 2023-04-15 18:06:42 +02:00
Martin Dvorak
83b2eb48f4 Updating static release time. 2022-12-11 21:32:38 +01:00
Martin Dvorak
9913d7a0d6 Fixing tests and adding GitHub Actions build which resolves #472 2022-12-11 17:34:59 +01:00
Martin Dvorak
f945c7f209
Missing null termination fix in the shell detection #463 from ihsinme/patch-1 2022-12-10 20:53:11 +01:00
Martin Dvorak
a747ee7d66
Write out of bounds array fix #464 from ihsinme/patch-2 2022-12-10 20:41:01 +01:00
Martin Dvorak
e459a12a48 Removing obsolete overflow TODO. 2022-12-10 20:35:42 +01:00
Martin Dvorak
79bc44a263
Merge pull request #469 from juppytt/master
Heap buffer overflow in search fix (#467) and stack buffer overflow
2022-12-10 20:33:42 +01:00
Martin Dvorak
b6b27657d9 2021 > 2022. 2022-12-10 20:20:52 +01:00
Juhee Kim
1ffe76b5f3 fix stack overflow read 2022-12-07 11:26:53 +09:00
Juhee Kim
5ebf10a42c fix heap buffer overflow in parse_history_line 2022-12-05 10:02:04 +09:00
ihsinme
c29aaff98f
fix write out of bounds array
otherwise, `screenLine[count]=0;` will write a byte beyond the boundaries of the array on the stack.
2022-10-02 12:43:33 +03:00
ihsinme
eb7637beaa
there is no place for null termination.
you will always return a string truncated by one character.

add one more byte
2022-10-02 12:33:49 +03:00
Martin Dvorak
9152b59527 Fixing Arch build by fixing bug in mvprintw which resolves #443 2021-12-13 22:07:30 +01:00
Martin Dvorak
41a2989e7f Terminal prompt inject to insert; build fixes. 2021-12-03 18:45:59 +01:00
Martin Dvorak
1a36278dec Improving command injection documentation. 2021-12-03 07:50:55 +01:00
Thibault Charbonnier
6eb799bc63
Fix a memory leak in blacklist component (#420) 2021-12-02 23:59:52 +01:00
Martin Dvorak
04cee3c27d Finishing zsh unmetafy unicode fix #416 #223 2021-12-02 23:56:24 +01:00
崔小二
4e1b2385bc
Unmetafy unicode when zsh (#416) 2021-12-02 23:50:07 +01:00
Martin Dvorak
ba39fd274e Updating build date. 2021-12-02 23:25:35 +01:00
Martin Dvorak
64b96d478a Adding ability to inject command to terminal. 2021-12-02 22:52:13 +01:00
Martin Dvorak
7d984e4f0d Skipping history -r under zsh to avoid printing whole history after a command delete which resolves #248 and resolves #386 2021-06-26 18:27:24 +02:00
Jonathan Chappelow
1d82a22f9c
Do not call isZshParentShell for every history line to ensure performance (#418) 2021-01-03 22:51:41 +01:00
Martin Dvorak
8ff329e7c4 2.3.0 release version references and changelog. 2020-11-19 07:41:56 +01:00
Martin Dvorak
db37132d0a Merge branch 'master' into dev/2.3.0 2020-11-19 07:31:18 +01:00
Thibault Charbonnier
cba16a2d71
Fix a potential buffer overflow in 'get_shell_name_by_ppid' (#411) 2020-11-19 07:24:56 +01:00
Thibault Charbonnier
2fcef2f123
Exclude 'hh' from history (#412) 2020-11-19 07:22:54 +01:00
Thibault Charbonnier
5ab8205859
Fix of wrong zsh extended history (with timestamps) SEGFAULT and parsing #409 (#410)
This patch fixes a segfault when .zsh_history contains commands starting
with `:` and longer than 15 characters long.

Considering the history line:

    : 1592444398:0;:vspman epoll_ctl

The ranked item's line will be:

    :vspman epoll_ctl

When building the prioritized history, we used to apply the zsh extended
history offset if the line starts with `:` (and if the command is longer
than `15`, defined by `ZSH_HISTORY_ITEM_OFFSET`), which then makes the
item point to:

    tl

This makes the `r->item` pointer invalid, which causes the segfault
observed in #408 within `prioritized_history_destroy`.

---

This patch prevents the same issue from arising again (even if the
line is wrongly interpreted) since it avoids any pointer arithmetic
between assignment and freeing.

Additionally, the patch also greatly improves the heuristics used in
determining whether a line is of extended history format or not, since
the non-extended format is also supported by zsh.

---

Fix #410
Fix #399
2020-11-19 07:13:30 +01:00
Martin Dvorak
e2c4484f2e Just minor sources polishing. 2020-05-13 20:58:11 +02:00
Martin Dvorak
e9452d2cdd More memory leak fixes - nonexistent HISTFILE in particular #379 #353 #330 2019-12-21 12:02:03 +01:00
Martin Dvorak
cb431c67da ncurses memory leaks explanation. 2019-12-21 09:32:59 +01:00
Martin Dvorak
463dcdd9ba Fixing various memory leaks #370 2019-12-21 08:54:56 +01:00
Martin Dvorak
4976bab73f Polishing sources (copyrights, test refactoring). 2019-12-21 07:53:11 +01:00
Martin Dvorak
c037f243d9
Merge pull request #377 from bibermann/374-fix-disappearing-help
Fix disappearing help labels when typing.
2019-12-16 22:44:32 +01:00
Martin Dvorak
524706c7e0 Finishing bash/Bash convetions. 2019-12-16 22:40:43 +01:00
Fabian Sandoval Saldias
d7d27bc58b Fix disappearing help labels when typing.
Affected config: HSTR_CONFIG=help-on-opposite-side.
2019-12-16 22:26:44 +01:00
Martin Dvorak
b8aadca199
Merge branch 'dev/2.2.0' into 165-help-location-options 2019-12-16 21:13:46 +01:00
Martin Dvorak
72ef7dfc84
Merge pull request #372 from bibermann/fix-favorites-delete-messages
Fix favorites delete messages.
2019-12-16 21:06:26 +01:00
Martin Dvorak
952a0895c2
Merge pull request #373 from bibermann/support-for-running-in-subshell
Fix for subshell mode.
2019-12-16 21:04:08 +01:00
Fabian Sandoval Saldias
44c7fec5f8 Fix for subshell mode. 2019-12-16 20:39:25 +01:00
Fabian Sandoval Saldias
c385a57c87 Allow repositioning and hiding of help labels. 2019-12-16 19:49:49 +01:00