mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 10:32:31 +02:00
Fix segfault when 'script error' handlers fail
Add logic to detect errors in 'script error' handlers, and prevent them from causing infinite recursion that crashes the entire program.
This commit is contained in:
parent
647ef193a8
commit
bfa217b283
4 changed files with 72 additions and 3 deletions
|
|
@ -8,6 +8,10 @@ typedef struct {
|
|||
/* Script can be loaded from a file, or from some data in memory */
|
||||
char *path; /* FILE: full path for file */
|
||||
char *data; /* DATA: data used for the script */
|
||||
|
||||
/* internal bookkeeping */
|
||||
char script_error_status; /* script error status */
|
||||
char disable_signals; /* don't deliver signals to this script */
|
||||
} PERL_SCRIPT_REC;
|
||||
|
||||
extern GSList *perl_scripts;
|
||||
|
|
@ -55,4 +59,9 @@ int perl_get_api_version(void);
|
|||
void perl_core_init(void);
|
||||
void perl_core_deinit(void);
|
||||
|
||||
/* Reports script errors.
|
||||
* Upon return, @param script may have been (and probably was) freed.
|
||||
*/
|
||||
void perl_report_script_error(PERL_SCRIPT_REC *script, const char *error);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue