]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
idnode: temporary workaround for the static string comparison issue
authorAdam Sutton <dev@adamsutton.me.uk>
Tue, 15 Oct 2013 21:18:25 +0000 (22:18 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Sun, 27 Oct 2013 23:18:02 +0000 (23:18 +0000)
src/idnode.c

index abe39042f283c19b27c7a0099bffb7a22abec6cf..060dfae04a829afe9a6f2c97f091d9c94c7c3b80 100644 (file)
@@ -488,7 +488,7 @@ idnode_cmp_sort
     case PT_STR:
       {
         int r;
-        const char *stra = idnode_get_str(ina, sort->key);
+        const char *stra = strdupa(idnode_get_str(ina, sort->key) ?: "");
         const char *strb = idnode_get_str(inb, sort->key);
         if (sort->dir == IS_ASC)
           r = strcmp(stra ?: "", strb ?: "");