diff options
author | Max Kellermann <max@duempel.org> | 2008-03-26 10:38:07 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:38:07 +0000 |
commit | 27f12c173d57d09d095d0e5ecfeb18acf5d2434a (patch) | |
tree | a1016cf4f069f0ab804f3023c87eb494c45dfed2 /src/pcm_utils.c | |
parent | 0692f6cd0ab12e921d1897de215fb42d6dc79a7c (diff) | |
download | mpd-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/pcm_utils.c')
-rw-r--r-- | src/pcm_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c index d11d4d42f..be32729f0 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -359,7 +359,7 @@ static char *pcm_convertTo16bit(mpd_sint8 bits, char *inBuffer, size_t inSize, char *outBuffer = NULL; mpd_sint8 *in; mpd_sint16 *out; - int i; + size_t i; switch (bits) { case 8: |