1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-08 04:26:01 -04:00
Commit Graph

3928 Commits

Author SHA1 Message Date
ailin-nemui
4edfccfce7 get rid of new_text 2017-06-05 13:46:43 +02:00
ailin-nemui
48899a123d Update iregex-gregex.c
add 2 comments about new_string
2017-06-05 10:23:16 +02:00
ailin-nemui
00354c3651 Update iregex-gregex.c
make helper functions static
2017-06-05 10:10:38 +02:00
ailin-nemui
78a390f479 abi up 2017-06-04 19:03:40 +02:00
ailin-nemui
79bbca4644 Refactor regex and implement UTF8 mode for GRegex
- with non-unicode byte to Private Use Area A mapping
- move all ifdefs to iregex.h file only
2017-06-04 00:52:53 +02:00
ailin-nemui
31b9d115b0 Merge pull request #706 from dequis/parse-uint
Add parse_uint function to improve integer overflow handling
2017-06-02 14:47:38 +02:00
Joseph Bisch
1ce9e07be0
Use CXX for fe-fuzz linking 2017-06-01 23:59:19 -04:00
ailin-nemui
d61c54c32b do not reset true colour bit on colour reset
fixes #710
2017-05-27 00:12:54 +02:00
dequis
632b0ce5e6 Add parse_uint function to improve integer overflow handling
Originally found by oss-fuzz (issue 525) in get_ansi_color using ubsan.
After a lot of analysis I'm 99% sure this isn't security relevant so
it's fine to handle this publicly.

The fix is mainly adding a function that does it right and use it
everywhere. This is harder than it seems because the strtol() family of
functions doesn't have the friendliest of interfaces.

Aside from get_ansi_color(), there were other pieces of code that used
the same (out*10+(*in-'0')) pattern, like the parse_size() and
parse_time_interval() functions, which are mostly used for settings.
Those are interesting cases, since they multiply the parsed number
(resulting in more overflows) and they write to a signed integer
parameter (which can accidentally make the uints negative without UB)

Thanks to Pascal Cuoq for enlightening me about the undefined behavior
of parse_size (and, in particular, the implementation-defined behavior
of one of the WIP versions of this commit, where something like signed
integer overflow happened, but it was legal). Also for writing
tis-interpreter, which is better than ubsan to verify these things.
2017-05-18 00:21:11 -03:00
ailin-nemui
10cea61696 Merge pull request #702 from vague666/server_modify_notls
Added support for -notls and -notls_verify
2017-05-14 09:44:26 +02:00
ailin-nemui
81cf8d8813 Update fe-server.c 2017-05-14 09:43:38 +02:00
ailin-nemui
371eb7f505 expand macro 2017-05-12 16:27:33 +02:00
ailin-nemui
787e192567 improve nicklist performance 2017-05-12 13:36:48 +02:00
Jari Matilainen
783458e9ba Added code comments 2017-05-11 14:08:45 +02:00
Jari Matilainen
f060292a9c Added braces 2017-05-11 11:17:14 +02:00
Jari Matilainen
dbde9f0fe3 Added support for -notls and -notls_verify 2017-05-11 10:57:24 +02:00
LemonBoy
c890ecafa0 Merge pull request #686 from josephbisch/remove-history-wrap
Don't allow command history to wrap around
2017-04-11 15:19:19 +02:00
Joseph Bisch
3297fafcd9
Add syntax info for completion
Allows syntax info to be picked up and displayed by help command.

Fixes #687
2017-04-07 12:56:46 -04:00
Joseph Bisch
405136440c
Remove over_counter
We are no longer using over_counter for any functional purpose, so
remove it.
2017-04-07 08:20:28 -04:00
Joseph Bisch
7c86575b02
Don't allow command history to wrap around
This changes the behavior of the command history to avoid wrapping back
to the bottom once the top of the history is reached.
2017-04-06 20:27:39 -04:00
Joseph Bisch
41776d71f7
Fix strange history behavior when history is empty
If text is being entered and then the user presses the up arrow
followed by the down arrow, the expected behavior is to return to the
text being entered. Prior to this commit that was not the case.

Fixes #462
2017-04-05 11:00:25 -04:00
Joseph Bisch
a4cc4e0ad7
Fix off by one error with char_expandos 2017-03-31 15:37:48 -04:00
Stephen Oberholtzer
2b9be6e2ed Intentation/whitespace fixes
Change several instances of space-indentation to tabs, matching the
surrounding code.
2017-03-21 10:27:39 -04:00
Stephen Oberholtzer
70f9db3cbd Fix delay at startup when running against glib 2.49.3+
In glib v2.49.3, an optimization was made to eliminate certain
unnecessary wakeups.  (The specific change was made in
e4ee3079c5afc3c1c3d2415f20c3e8605728f074). Before this change, the
first call to g_main_iteration would always complete immediately.
In Irssi, this effectively reversed the order of the main loop, causing
the reload_config check and the dirty_check to run *before* the first
blocking call to g_main_iteration.

With the new logic, the first g_main_iteration call now blocks,
preventing the screen from being refreshed until the user starts typing
or a timer goes off.  (It also delays processing of SIGHUP, but I
expect that is not a common situation.)

This commit reorders the main loop to wait at the end of the loop,
rather than the beginning, addressing the problem.

(This closes Debian bug #856201.)
2017-03-21 09:37:23 -04:00
ailin-nemui
966efced3c up abi ver 2017-03-14 09:54:28 +01:00
ailin-nemui
e2e02160cd Merge pull request #645 from LemonBoy/keyboard-misc
Timeout feature for keys
2017-03-11 23:11:43 +01:00
Ailin Nemui
77b2631c78 Merge branch 'netjoin-timeout' into 'master'
fe-netjoin: remove irc servers on "server disconnected" signal

Closes #7

See merge request !10
2017-03-10 17:18:18 +01:00
dequis
93c158d815 expand_escape: expand double backslash as a backslash 2017-03-08 20:01:05 -03:00
ailin-nemui
d57c64adeb Merge pull request #667 from ailin-nemui/fix-dcc-get
fix dcc get

fixes #656
2017-03-08 09:45:40 +01:00
ailin-nemui
ddba68ad77 Merge pull request #659 from ailin-nemui/foreach_dontspam
make foreach send commands
2017-03-07 23:37:23 +01:00
ailin-nemui
7bd1b80687 fix dcc get
fixes #656
2017-03-07 23:27:08 +01:00
ailin-nemui
62fd3ac180 Revert "Quote the filename when dcc requests are auto accepted." 2017-03-06 11:27:55 +01:00
ailin-nemui
29f27cfb39 Merge pull request #658 from LemonBoy/dcc-autoaccept
Quote the filename when dcc requests are auto accepted.
2017-03-04 21:43:21 +01:00
LemonBoy
dc99f8d7a5 Properly check the command arguments in tail place.
A command requiring an argument and given in tail position would not
raise an error but silently set the value to the empty string ''.
2017-03-04 21:37:13 +01:00
Nei
7ef22687f9 Merge branch 'd-minor' into 'master'
Prevent some potential null-pointer deferences.

See merge request !9
2017-03-04 20:35:17 +00:00
Stephen Oberholtzer
5c4e6304ce Don't emit the script destroyed signal before script is actually destroyed
The script unloading code originally worked like this:

1. Destroy package
2. Emit 'script destroyed' signal
3. Unhook script's signal handlers

If a script added a 'script destroyed' signal handler, unloading
that script would cause the 'script destroyed' signal to be sent to the
(already destroyed) package.  This would cause a script error, which would
trigger a script unload, which would start the whole process over again,
until we run out of heap or stack space and segfault.

This commit simply reorders the operations so that the 'script destroyed'
signal is sent *after* the script is fully destroyed.
2017-02-28 23:48:56 -05:00
dequis
7c09b72848 fe-netjoin: remove irc servers on "server disconnected" signal 2017-02-27 23:43:37 -03:00
ailin-nemui
fa1a056291 Merge pull request #647 from dequis/fix-early-ison-take-2
notify-ison: Don't send ison before the connection is done
2017-02-27 14:45:41 +01:00
ailin-nemui
9aaa6449a0 make foreach send commands 2017-02-27 13:43:58 +01:00
LemonBoy
027acffb42 Handle file names with quotes.
Let's repurpose escape_string and make it more flexible by letting us
choose the characters to escape.
2017-02-22 11:49:09 +01:00
LemonBoy
db85ab7c90 Quote the filename when dcc requests are auto accepted.
PR #453 forces the user to quote the filenames given to /DCC commands
when they contain spaces but the autoget functionality didn't get
updated so the filename was always passed without quotes.

Closes #656.
2017-02-21 15:17:37 +01:00
LemonBoy
9cae98e642 Execute what's left in the input queue when the timeout expires.
Similar to how vim behaves.
2017-02-18 15:57:55 +01:00
ailin-nemui
540639e0fa Merge pull request #627 from LemonBoy/ssl-expiry
Check whether the client certificate is expired.
2017-02-15 15:49:00 +01:00
LemonBoy
c067f8e99b Do not alias /server <hostname> to /server connect <hostname>
Closes #559.
2017-02-14 23:02:05 +01:00
LemonBoy
98ead50b4e Prevent some potential null-pointer deferences.
Spotted by our friend scan-build.
2017-02-14 14:46:14 +01:00
dequis
15736ba5ab notify-ison: Don't send ison before the connection is done 2017-02-11 00:07:03 -03:00
ailin-nemui
653c7fb05a Merge pull request #622 from ailin-nemui/starttls
provide net_start_ssl api
2017-02-06 12:38:20 +01:00
ailin-nemui
28df637055 provide net_start_ssl api
fixes #615
2017-02-05 23:08:42 +01:00
ailin-nemui
ff5dd3673e Merge pull request #628 from LemonBoy/openssl-compat
Support OpenSSL 1.1.0.
2017-02-05 22:20:31 +01:00
LemonBoy
73e8a065bd Support OpenSSL 1.1.0.
- X509_get_notBefore becomes X509_get0_notBefore
- X509_get_notAfter becomes X509_get0_notAfter
- ASN1_STRING_data becomes ASN1_STRING_get0_data (and drops the const)
- The whole library is now initialized by OPENSSL_init_ssl

Closes #597
2017-02-03 13:29:19 +01:00