aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-03-26 10:38:34 +0000
committerEric Wong <normalperson@yhbt.net>2008-03-26 10:38:34 +0000
commitd78ddd1e50dae2038a0d3f742d45e17dee0bbe4b (patch)
tree17c821c10628ddab90f752556c5fbab111c2ffbc /src/inputPlugins
parentad0d350f286ec9e1312ddeef8386ccdc42a03c5a (diff)
downloadmpd-d78ddd1e50dae2038a0d3f742d45e17dee0bbe4b.tar.gz
mpd-d78ddd1e50dae2038a0d3f742d45e17dee0bbe4b.tar.xz
mpd-d78ddd1e50dae2038a0d3f742d45e17dee0bbe4b.zip
wavpack_plugin: cleanups after the last commit
* malloc() => xmalloc() for error checking * strncpy() replaced with memcpy(), memcpy appears perfectly safe here and mpd does not ever use strncpy() (see r4491) git-svn-id: https://svn.musicpd.org/mpd/trunk@7211 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/wavpack_plugin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inputPlugins/wavpack_plugin.c b/src/inputPlugins/wavpack_plugin.c
index 8f0685aa2..e25b5099c 100644
--- a/src/inputPlugins/wavpack_plugin.c
+++ b/src/inputPlugins/wavpack_plugin.c
@@ -468,12 +468,12 @@ static int wavpack_streamdecode(OutputBuffer *cb, DecoderControl *dc,
break;
}
- wvc_url = (char *)malloc(len + 2); /* +2: 'c' and EOS */
+ wvc_url = (char *)xmalloc(len + 2); /* +2: 'c' and EOS */
if (wvc_url == NULL) {
break;
}
- strncpy(wvc_url, dc->utf8url, len);
+ memcpy(wvc_url, dc->utf8url, len);
wvc_url[len] = 'c';
wvc_url[len + 1] = '\0';