Fix PAM auth. Bug 2813
authorAdam Lackorzynski <adam@l4re.org>
Sat, 16 Oct 2021 15:30:07 +0000 (16:30 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 16 Oct 2021 15:34:03 +0000 (16:34 +0100)
src/src/auths/call_pam.c

index 80bb23ec396759226b445759b4b639b4b2b8211d..03b9be1a8de8279513ac9a80d6a6f7c558ecbf8a 100644 (file)
@@ -88,7 +88,7 @@ for (int i = 0; i < num_msg; i++)
        arg = US"";
        pam_arg_ended = TRUE;
        }
-      reply[i].resp = CS string_copy_malloc(arg); /* PAM frees resp */
+      reply[i].resp = strdup(CCS arg); /* Use libc malloc, PAM frees resp directly*/
       reply[i].resp_retcode = PAM_SUCCESS;
       break;