]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Catch the non-OSX cmd->install_path == NULL case (CID #1504302) (#4521)
authorJames Jones <jejones3141@gmail.com>
Thu, 19 May 2022 22:56:13 +0000 (17:56 -0500)
committerGitHub <noreply@github.com>
Thu, 19 May 2022 22:56:13 +0000 (17:56 -0500)
scripts/jlibtool.c

index 75cef0b75cc53503a903d78bdd2196c8c3d17b17..c35c1151c5704fb54eff572d1b1a737e40f428b4 100644 (file)
@@ -2384,7 +2384,11 @@ static void link_fixup(command_t *cmd)
                                {
                                        char *tmp = lt_malloc(PATH_MAX + 30);
 
-                                       strcpy(tmp, cmd->install_path);
+                                       if (cmd->install_path) {
+                                               strcpy(tmp, cmd->install_path);
+                                       } else {
+                                               strcpy(tmp, "");
+                                       }
 
                                        if (cmd->shared_name.install) {
                                                strcat(tmp, strrchr(cmd->shared_name.install, '/'));