Fix incorrect realloc size which was causing 'ls' command to fail on large directories.