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
1 changed files with 1 additions and 1 deletions

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;