X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=mp3_afh.c;h=4764d3ceb8c9de0d6f07d001dc89e15fd17dc26a;hp=8ca319b4705c9c12492ef2f26a418affb4cd39c3;hb=652128ed748840a22d4dcb85c1ac54bc95fdc33d;hpb=095fc31c48324112a71602ba6975d9d33cf4378e diff --git a/mp3_afh.c b/mp3_afh.c index 8ca319b4..4764d3ce 100644 --- a/mp3_afh.c +++ b/mp3_afh.c @@ -122,7 +122,7 @@ static int header_channels(struct mp3header *h) 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]; } @@ -280,7 +280,7 @@ static void mp3_get_id3(unsigned char *map, off_t numbytes, off_t *fpos) 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; }