mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -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 ) {
|
||||
retv[( *length ) + 1] = NULL;
|
||||
retv = g_realloc ( retv, ( *length + 1 ) * sizeof ( char* ) );
|
||||
retv[( *length ) ] = NULL;
|
||||
}
|
||||
TICK_N ( "Read stdin STOP" );
|
||||
return retv;
|
||||
|
|
Loading…
Reference in a new issue