mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-10 15:44:41 -05:00
Fix a crash due to overlapping arguments of memcpy(3).
As the use of memcpy(3) on overlapping memory regions is strictly undefined, OpenBSD's memcpy(3) triggers an abort in such cases.
This commit is contained in:
parent
96724356e1
commit
b2bc07e51d
1 changed files with 1 additions and 1 deletions
|
@ -940,7 +940,7 @@ static void menu_refilter ( MenuState *state )
|
|||
g_mutex_clear ( &mutex );
|
||||
for ( unsigned int i = 0; i < nt; i++ ) {
|
||||
if ( j != states[i].start ) {
|
||||
memcpy ( &( state->line_map[j] ), &( state->line_map[states[i].start] ), sizeof ( unsigned int ) * ( states[i].count ) );
|
||||
memmove ( &( state->line_map[j] ), &( state->line_map[states[i].start] ), sizeof ( unsigned int ) * ( states[i].count ) );
|
||||
}
|
||||
j += states[i].count;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue