summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <DaveDavenport@users.noreply.github.com>2016-01-03 21:27:51 +0100
committerDave Davenport <DaveDavenport@users.noreply.github.com>2016-01-03 21:27:51 +0100
commitf65dc350364d1ae0898ad26941804176cfabf149 (patch)
treef883611962468bcb8fb0d49a5c24b2481d4d0c02
parent96724356e1b7ea724ca999f4dabbe4e9d5948b36 (diff)
parentb2bc07e51dbd2fd0f8455c73759ef5db8c2af746 (diff)
Merge pull request #312 from jasperla/memmove
Fix a crash due to overlapping arguments of memcpy(3).
-rw-r--r--source/rofi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 0c6f388c..b830114a 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -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;
}