From: Mike Brady Date: Wed, 19 Feb 2020 09:34:17 +0000 (+0000) Subject: fix compaison between old and new metadata string -- check for lenghts, huh. X-Git-Tag: 3.3.7d12~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6ce0262a231ce8398716a00b86e98d75388ebab;p=thirdparty%2Fshairport-sync.git fix compaison between old and new metadata string -- check for lenghts, huh. --- diff --git a/common.c b/common.c index 3d41cb6c..1f56430e 100644 --- a/common.c +++ b/common.c @@ -1554,7 +1554,7 @@ int64_t generate_zero_frames(char *outp, size_t number_of_frames, sps_format_t f int string_update_with_size(char **str, int *flag, char *s, size_t len) { if (*str) { if ((s) && (len)) { - if (strncmp(*str, s, len) != 0) { + if ((len == strlen(*str)) && (strncmp(*str, s, len) != 0)) { free(*str); *str = strndup(s, len); *flag = 1;