mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added check on input length
This commit is contained in:
parent
a720ef2627
commit
e083e20313
@ -142,6 +142,10 @@ _inp_get_char(char *input, int *size)
|
|||||||
// if it wasn't an arrow key etc
|
// if it wasn't an arrow key etc
|
||||||
if (!_handle_edit(result, ch, input, size)) {
|
if (!_handle_edit(result, ch, input, size)) {
|
||||||
if (_printable(ch) && result != KEY_CODE_YES) {
|
if (_printable(ch) && result != KEY_CODE_YES) {
|
||||||
|
if (*size >= INP_WIN_MAX) {
|
||||||
|
return ERR;
|
||||||
|
}
|
||||||
|
|
||||||
inp_x = getcurx(inp_win);
|
inp_x = getcurx(inp_win);
|
||||||
|
|
||||||
// handle insert if not at end of input
|
// handle insert if not at end of input
|
||||||
|
Loading…
Reference in New Issue
Block a user