mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#10218 Command line recall rolls into Segmentation Fault(coredump)'
- Declare 'tgoto' if not already declared in system header files. cmd-line-utils/libedit/el_term.h: Declare 'tgoto' if not already declared in system header files. Failing to declare it will cause the pointer returned to be truncated to 32-bit integer which is no a valid pointer - in most cases. configure.in: Add check to see if 'tgoto' is declared in system header files
This commit is contained in:
@ -90,6 +90,16 @@ extern char* tgoto(const char*, int, int);
|
||||
extern char* tgetstr(char*, char**);
|
||||
#endif
|
||||
|
||||
|
||||
#if !HAVE_DECL_TGOTO
|
||||
/*
|
||||
'tgoto' is not declared in the system header files, this causes
|
||||
problems on 64-bit systems. The function returns a 64 bit pointer
|
||||
but caller see it as "int" and it's thus truncated to 32-bit
|
||||
*/
|
||||
extern char* tgoto(const char*, int, int);
|
||||
#endif
|
||||
|
||||
protected void term_move_to_line(EditLine *, int);
|
||||
protected void term_move_to_char(EditLine *, int);
|
||||
protected void term_clear_EOL(EditLine *, int);
|
||||
|
Reference in New Issue
Block a user