]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
fix compaison between old and new metadata string -- check for lenghts, huh.
authorMike Brady <mikebrady@eircom.net>
Wed, 19 Feb 2020 09:34:17 +0000 (09:34 +0000)
committerMike Brady <mikebrady@eircom.net>
Wed, 19 Feb 2020 09:34:17 +0000 (09:34 +0000)
common.c

index 3d41cb6c8904896f166f22fe21f3dd30d7ded04e..1f56430e50c61a8a3244a82f8d943bc522ed8d50 100644 (file)
--- 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;