Rockbox mail archiveSubject: Re: Suspicious code in playlist.c?
Re: Suspicious code in playlist.c?
From: Hardeep Sidhu <hardeeps_at_pobox.com>
Date: Mon, 03 Apr 2006 07:26:41 -0700
> 1. This code in playlist.c look suspicious: playlist->amount is only
> tested against playlist->max_playlist_size AFTER playlist_>amount is
> used as an array index. (Lines 510, 513, 515.)
> 2. And, if amount >= max_playlist_size, the function returns without
> calling queue_post. Shouldn't we be able to use playlists up to and
> including max_playlist_size? Instead we can only use playlists up to
> max_playlist_size - 1.
> 3. Shouldn't we either be calling queue_post or reverting
> playlist_info's state if we have to end because max_playlist_size has
> been reached?
Thanks for investigating. I've committed fixes for all these problems.
Received on 2006-04-03