X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=blobdiff_plain;f=config%2Fsymbol.c;h=55c95e0bb48a546c7fddd5fae42d9f7855ad840b;hp=35e0937aa6a6fd3b47f15974f6df121c41c55488;hb=2d2c41c2a3de84a2820bcb10988b4e66d654e227;hpb=8208d00a70bdf17ba50edea6cf1a79a3fd93744a diff --git a/config/symbol.c b/config/symbol.c index 35e0937..55c95e0 100644 --- a/config/symbol.c +++ b/config/symbol.c @@ -907,6 +907,10 @@ const char *sym_expand_string_value(const char *in) char *res; size_t reslen; + /* + * Note: 'in' might come from a token that's about to be + * freed, so make sure to always allocate a new string + */ reslen = strlen(in) + 1; res = xmalloc(reslen); res[0] = '\0';