mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fix an OOB access in the cutbuffer implementation.
This commit is contained in:
parent
17f4bd2060
commit
251d8a686a
@ -655,7 +655,7 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size, CUTBUFFER_UPDATE_OP update_
|
|||||||
tmp->cutbuffer = g_new(unichar, cutbuffer_new_size+1);
|
tmp->cutbuffer = g_new(unichar, cutbuffer_new_size+1);
|
||||||
memcpy(tmp->cutbuffer, tmpcutbuffer,
|
memcpy(tmp->cutbuffer, tmpcutbuffer,
|
||||||
tmp->cutbuffer_len * sizeof(unichar));
|
tmp->cutbuffer_len * sizeof(unichar));
|
||||||
memcpy(tmp->cutbuffer + tmp->cutbuffer_len * sizeof(unichar),
|
memcpy(tmp->cutbuffer + tmp->cutbuffer_len,
|
||||||
entry->text + entry->pos - size, size * sizeof(unichar));
|
entry->text + entry->pos - size, size * sizeof(unichar));
|
||||||
|
|
||||||
tmp->cutbuffer_len = cutbuffer_new_size;
|
tmp->cutbuffer_len = cutbuffer_new_size;
|
||||||
|
Loading…
Reference in New Issue
Block a user