X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=mp3_afh.c;h=9ef5dffb76a6c46542d827d3674e202ee27204a9;hb=c5caf558a7d940b59fb66eca33c813d6ddd559bb;hp=b510e72f946a33e701a626d0a59ca5c2790d1d4d;hpb=e402aa45bbac0b078fefc88ed6dd108cbae6e743;p=paraslash.git diff --git a/mp3_afh.c b/mp3_afh.c index b510e72f..9ef5dffb 100644 --- a/mp3_afh.c +++ b/mp3_afh.c @@ -30,7 +30,6 @@ #include "server.h" #include "error.h" -#include "fd.h" #include "string.h" /** \cond some defines and structs which are only used in this file */ @@ -123,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]; }