summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-05-30 20:25:35 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-05-31 23:02:28 -0400
commitd1aeb7db9dbc3cdd0db25ab709b9e2d2322ef8d2 (patch)
treea4206b281d04a43d3843335aaa631138ffe82cd0
parenteaeaac598d5c06a138a5e8ea012f7a959461e473 (diff)
downloadrockbox-d1aeb7db9d.tar.gz
rockbox-d1aeb7db9d.zip
[Coverity] playback.c audio_auto_change_frequency check for valid id3
Change-Id: Ia213134c690f4c1de16afba38eea740825558280
-rw-r--r--apps/playback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 7ea44a047f..18f62fb69b 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -4054,6 +4054,8 @@ static unsigned long audio_guess_frequency(struct mp3entry *id3)
static bool audio_auto_change_frequency(struct mp3entry *id3, bool play)
{
+ if (!valid_mp3entry(id3))
+ return false;
unsigned long guessed_frequency = global_settings.play_frequency == 0 ? audio_guess_frequency(id3) : 0;
if (guessed_frequency && mixer_get_frequency() != guessed_frequency)
{