aboutsummaryrefslogtreecommitdiffstats
path: root/src/outputBuffer.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-03-26 10:38:07 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:38:07 +0000
commit27f12c173d57d09d095d0e5ecfeb18acf5d2434a (patch)
treea1016cf4f069f0ab804f3023c87eb494c45dfed2 /src/outputBuffer.c
parent0692f6cd0ab12e921d1897de215fb42d6dc79a7c (diff)
downloadmpd-27f12c173d57d09d095d0e5ecfeb18acf5d2434a.tar.gz
mpd-27f12c173d57d09d095d0e5ecfeb18acf5d2434a.tar.xz
mpd-27f12c173d57d09d095d0e5ecfeb18acf5d2434a.zip
use size_t
When dealing with in-memory lengths, the standard type "size_t" should be used. Missing one can be quite dangerous, because an attacker could provoke an integer under-/overflow, which may provide an attack vector. git-svn-id: https://svn.musicpd.org/mpd/trunk@7205 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/outputBuffer.c')
-rw-r--r--src/outputBuffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index 04770b478..25325ecb7 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -66,7 +66,7 @@ void flushOutputBuffer(OutputBuffer * cb)
int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
DecoderControl * dc, int seekable, void *dataIn,
- long dataInLen, float data_time, mpd_uint16 bitRate,
+ size_t dataInLen, float data_time, mpd_uint16 bitRate,
ReplayGainInfo * replayGainInfo)
{
mpd_uint16 dataToSend;
@@ -74,7 +74,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
char *data;
size_t datalen;
static char *convBuffer;
- static long convBufferLen;
+ static size_t convBufferLen;
if (cmpAudioFormat(&(cb->audioFormat), &(dc->audioFormat)) == 0) {
data = dataIn;