]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix use-after-free error in 316b966b
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 3 Feb 2018 21:56:11 +0000 (22:56 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 3 Feb 2018 21:56:11 +0000 (22:56 +0100)
ccache.c

index 15c225ce221af2bd583b5bd946f7752eb6fcd531..c1d51da5a2752301e0c830a13ee35a6421deb4f5 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -2847,7 +2847,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                        result = false;
                        goto out;
                }
-               actual_language = explicit_language;
+               actual_language = x_strdup(explicit_language);
        } else {
                actual_language = file_language;
        }