# HG changeset patch # User Ralf Ertzinger # Date 1190216002 -7200 # Node ID d2e3eef907196102d8de09536a23653c58341c68 # Parent 4f4634573e412c7d87e4b149e5e005274b69f680 - Read the correct amount of data from the buffer when handling ShoutCast metadata diff -r 4f4634573e41 -r d2e3eef90719 src/neon/neon.c --- a/src/neon/neon.c Wed Sep 19 14:36:37 2007 +0200 +++ b/src/neon/neon.c Wed Sep 19 17:33:22 2007 +0200 @@ -940,7 +940,7 @@ * The maximum number of bytes we can deliver is determined * by the number of bytes left until the next metadata announcement */ - belem = h->icy_metaleft / size; + belem = MIN(used_rb(&h->rb), h->icy_metaleft) / size; } else { belem = used_rb(&h->rb) / size; }