From e49247e3e8335e3ba627648481ae6a15d61b2f1c Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Fri, 5 Oct 2007 16:02:35 +0000 Subject: [PATCH] get_metadata(): Clear the destination mp3entry to avoid having bogus pointers appear in it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14992 a1c6a512-1295-4272-9138-f99709370657 --- apps/metadata.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/metadata.c b/apps/metadata.c index 7ef2a05bea..66719754ad 100644 --- a/apps/metadata.c +++ b/apps/metadata.c @@ -101,6 +101,9 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) int i; #endif + /* Clear the mp3entry to avoid having bogus pointers appear */ + memset(id3, 0, sizeof(struct mp3entry)); + /* Take our best guess at the codec type based on file extension */ id3->codectype = probe_file_format(trackname);