More (v)snprintf-related buffer over-allocations removed
Also took out an unnecessary memset in getPlayerErrorStr git-svn-id: https://svn.musicpd.org/mpd/trunk@5396 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
@@ -303,8 +303,8 @@ char *getPlayerErrorStr(void)
|
||||
int errorlen = MAXPATHLEN + 1024;
|
||||
PlayerControl *pc = &(getPlayerData()->playerControl);
|
||||
|
||||
error = xrealloc(error, errorlen + 1);
|
||||
memset(error, 0, errorlen + 1);
|
||||
error = xrealloc(error, errorlen);
|
||||
error[0] = '\0';
|
||||
|
||||
switch (pc->error) {
|
||||
case PLAYER_ERROR_FILENOTFOUND:
|
||||
|
Reference in New Issue
Block a user