#include "server.h"
#include "error.h"
-#include "fd.h"
#include "string.h"
/** \cond some defines and structs which are only used in this file */
static int header_bitrate(struct mp3header *h)
{
- if (h->layer > 3 || h->bitrate > 14)
+ if (!h->layer || h->layer > 3 || h->bitrate > 14 || !h->bitrate)
return -E_HEADER_BITRATE;
return mp3info_bitrate[h->version & 1][3 - h->layer][h->bitrate - 1];
}
if (numbytes < 128)
return;
*fpos = numbytes - 128;
- if (strncmp("TAG", map + *fpos, 3)) {
+ if (strncmp("TAG", (char *) map + *fpos, 3)) {
PARA_INFO_LOG("%s", "no id3 tag\n");
return;
}