From: Adam Sutton Date: Tue, 15 Oct 2013 21:18:25 +0000 (+0100) Subject: idnode: temporary workaround for the static string comparison issue X-Git-Tag: v4.1~2433 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce48eeb9d48ceb2bc8286baacfa26edb7cbd3cd8;p=thirdparty%2Ftvheadend.git idnode: temporary workaround for the static string comparison issue --- diff --git a/src/idnode.c b/src/idnode.c index abe39042f..060dfae04 100644 --- a/src/idnode.c +++ b/src/idnode.c @@ -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 ?: "");