Commit graph

83 commits

Author SHA1 Message Date
Igor van den Hoven
199fa58050
Merge pull request #277 from jaypatrickhoward/claude_perf_fixes
Two small hot-path performance fixes (regex match_data reuse, vt102 strip)
2026-08-06 21:54:02 +02:00
Jay Howard
f191f801b4 Fix memory leak of search fields in delete_map
delete_map() released the map's search node fields and the search struct
itself but not its strdup'd arg, exit_list and id members (allocated in
map_search_compile), leaking them each time a map is torn down or
replaced. Free them before freeing the search struct; free(NULL) is a
no-op for the members that were never set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:32:46 +02:00
Jay Howard
58bb67ee87 Fix out-of-bounds access in #history get on empty history
history_get() clamped the requested index with URANGE(0, min,
root->used - 1); when the history list is empty (used == 0) the upper
bound is -1 and min became -1, so root->list[-1] was dereferenced.
Reject the command with an error when the history list is empty.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:25:05 +02:00
Jay Howard
816df7c6e2 Fix memory leak in scan_json on short read
scan_json() returned on a short/failed fread without freeing the src
buffer it had just allocated (the normal path frees it). Free src on
the error return.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:22:54 +02:00
Jay Howard
fe09096d4b Fix memory leak in basetostring/basetostringz
basetostring() and basetostringz() strdup'd a working buffer but, unlike
their encode counterparts stringtobase()/stringtobasez(), never freed it,
leaking one buffer per #format base decode. Free buf before returning,
matching the encode functions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 21:17:13 +02:00
Jay Howard
7598404ef0 Avoid evaluating skip_vt102_codes twice per escape
strip_vt102_codes() called skip_vt102_codes() once in the loop
condition and again in the body to advance, so every escape sequence
was classified twice. It runs on every incoming line (and on the whole
output buffer), so cache the returned length and reuse it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 14:02:20 -05:00
Jay Howard
07969f5310 Reuse a single PCRE2 match_data across matches
regexp_compare() allocated and freed a pcre2_match_data block on every
match attempt, i.e. once per line per trigger/alias/highlight/substitute
on the hot input path. Allocate one shared match_data on first use and
reuse it; pcre2_match overwrites the ovector each call and the result is
copied straight into gtd->match, so no per-call allocation is needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 14:01:57 -05:00
Igor van den Hoven
f46ee30a54
Merge pull request #270 from AdeBlanche/add-contributor-tag
To get contributor tag, just switched name order to make a change
2026-04-10 14:23:22 +02:00
Andreas de Blanche
e18a966b7d To get contributor tag, just switched name order to make a change 2026-04-10 13:47:50 +02:00
Scandum
010881e768 2.02.61 2026-01-29 13:25:33 +01:00
Scandum
99e0b0b113 2.02.61b 2026-01-27 07:21:18 +01:00
Igor van den Hoven
7e65670ed1
Merge pull request #267 from mattgleeson/kitty-kbd-sample
example script for kitty input protocol
2026-01-27 06:49:39 +01:00
Matt Gleeson
0097809fe6 example script for kitty input protocol
https://sw.kovidgoyal.net/kitty/keyboard-protocol/
2026-01-26 13:57:26 -06:00
Scandum
1e5fd4d1bf 2.02.60 2026-01-04 10:04:41 +01:00
Scandum
257c2faf7a 2.02.60 2026-01-03 20:28:31 +01:00
Scandum
7a0ae43245 2.02.60 2026-01-03 18:36:23 +01:00
Igor van den Hoven
cf8ac841e0
Merge pull request #251 from rigrig/fix-warnings
Thanks :)
2025-05-31 14:46:44 +02:00
Richard de Boer
629d87cd07
fix mapper search warning 2025-05-31 14:01:55 +02:00
Richard de Boer
67dab322f9
fix dangling pointer 2025-05-31 14:01:55 +02:00
Richard de Boer
acc951e54a
fix sprintf() buffer size warning 2025-05-31 14:01:55 +02:00
Scandum
834bcfa80a 2.02.51 2025-05-30 20:29:52 +02:00
Igor van den Hoven
453d78bcf5
Merge pull request #247 from nicmongeau/fix-memory-issue-on-session-dispose
fix: Fix memory issue on session dispose
2025-05-01 09:57:59 +02:00
Nicholas Mongeau
78ed7b42d7 fix: Fix memory issue on session dispose 2025-04-29 15:33:32 -04:00
Scandum
9d29659501 2.02.42 2025-01-04 18:30:27 +01:00
Igor van den Hoven
e23cfe3c18
Merge pull request #217 from dzpao/fix/missing-event
fix: missing event PORT RECEIVED DATA
2024-03-12 14:25:39 +01:00
dzp
c576644dc6
fix: missing event PORT RECEIVED DATA 2024-03-12 10:36:20 +08:00
Scandum
84ca426c77 2.02.41 2024-01-02 22:49:37 +01:00
Scandum
1249fc6530 Merge branch 'master' of https://github.com/scandum/tintin 2024-01-02 03:23:51 +01:00
Scandum
316d2700bb 2.02.40 2024-01-02 03:21:37 +01:00
Igor van den Hoven
48662f1d7e
Merge pull request #203 from jrobsonchase/tls_sni
ssl: add the SNI extension
2023-10-06 10:28:45 +02:00
Josh Robson Chase
dc5781a346 ssl: add the SNI extension 2023-10-05 19:41:15 -04:00
Igor van den Hoven
5874537690
Merge pull request #188 from dzpao/fix/doc
minor changes, fix doc highlight
2023-06-02 18:34:00 +02:00
dzp
5c185bba0c
minor changes, fix doc highlight 2023-06-02 10:13:45 +08:00
Igor van den Hoven
abd29f418d
Merge pull request #182 from vehsamrak/master
Unclosed bracket fixed in documentation for #line command
2023-04-25 23:21:56 +02:00
Petr Karmashev
333ae2a450 Unclosed bracket fixed in documentation for #line command 2023-04-26 04:02:37 +07:00
Igor van den Hoven
388b4fd0a1
Merge pull request #181 from mfontani/mf/202304_fix_mtts_val_for_mousetracking
telopt_client: TINTIN_FLAG_MOUSETRACKING from gtd, not ses
2023-04-17 22:10:59 +02:00
Marco Fontani
371a6568f1 telopt_client: TINTIN_FLAG_MOUSETRACKING from gtd, not ses
... as nothing is setting that flag on "ses":

    $ git grep 'SET.*MOUSETRACKING'
    src/config.c:            SET_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING);
    src/config.c:            SET_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING);
    src/config.c:            SET_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING);
    src/config.c:            SET_BIT(gtd->flags, TINTIN_FLAG_MOUSETRACKING);

With this change, connecting to a MUD which supports MTTS while having
done:

    #config mouse on

... properly sets the bits for "MOUSE TRACKING" and "MSLP", as it
probably should.

Previous to this change, it couldn't - as that bit is never set on "ses"
so it reported that it couldn't do mouse tracking OR MSLP, despite being
perfectly able to (due to the `#config mouse on`, which the docs say is
the minimum prerequisite for MSLP support):

    MSLP (Mud Server Link Protocol) requires enabling #config mouse on,
     and creating the appropriate LINK events.
2023-04-17 19:14:23 +02:00
Scandum
f1974327b7 2.02.31 2023-03-14 23:02:41 +01:00
Scandum
4a162139ee 2.02.31 2023-03-14 22:03:35 +01:00
Scandum
2e1c3ab693 2.02.30 2022-12-30 21:52:53 +01:00
Scandum
fc5eab93d7 2.02.21b 2022-12-28 00:09:12 +01:00
Scandum
4e06adeb99 2.02.21b 2022-12-25 22:49:18 +01:00
Scandum
650284e3a8 2.02.21b 2022-12-14 12:38:36 +01:00
Scandum
2b869749ec 2.02.21b 2022-12-09 23:58:28 +01:00
Scandum
a952871c6e 2.02.21b 2022-12-09 23:51:53 +01:00
scandum
f10d67801c
Merge pull request #101 from beinvisible/master
enable TCP keepalive
2022-08-19 18:12:57 +02:00
scandum
8c003a5f74
Merge pull request #112 from dzpao/fix/ascii-table
fix ascii table
2022-08-19 18:12:36 +02:00
dzp
65da51e110
fix ascii table
There are 4 ascii code attributes on the misplace line.
The first of these errors causes `#format %p' to not chomp off the CR correctly.

This fix has been verified to resolve the issue.
2022-08-19 21:41:31 +08:00
Stephan Weinberger
c462d1c405 add error message if setsockopt(KEPALIVE) fails 2022-05-28 12:43:42 +02:00
Stephan Weinberger
387049ccba enable tcp keepalive 2022-05-28 03:33:18 +02:00