mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Fix out of memory bound on array
This commit is contained in:
parent
8b82787df6
commit
270ec0c14b
1 changed files with 1 additions and 1 deletions
|
@ -94,8 +94,8 @@ static char **get_dmenu ( FILE *fd, unsigned int *length )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( retv != NULL ) {
|
if ( retv != NULL ) {
|
||||||
retv[( *length ) + 1] = NULL;
|
|
||||||
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
||||||
|
retv[( *length ) ] = NULL;
|
||||||
}
|
}
|
||||||
TICK_N ( "Read stdin STOP" );
|
TICK_N ( "Read stdin STOP" );
|
||||||
return retv;
|
return retv;
|
||||||
|
|
Loading…
Reference in a new issue