1
0
Fork 0
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:
Dave Davenport 2015-12-22 20:57:57 +01:00
parent 8b82787df6
commit 270ec0c14b

View file

@ -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;