]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils: Allocate memory on the frame in ntlm_auth main function.
authorAndreas Schneider <asn@samba.org>
Wed, 25 Jun 2025 13:49:46 +0000 (15:49 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 1 Jul 2025 08:17:30 +0000 (08:17 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/utils/ntlm_auth.c

index e17025e30438303205a1a1243e33d671f6850c58..e839076f8d52a5f5743c16879ca172dea7e679b3 100644 (file)
@@ -2734,7 +2734,8 @@ enum {
        while((opt = poptGetNextOpt(pc)) != -1) {
                switch (opt) {
                case OPT_CHALLENGE:
-                       opt_challenge = strhex_to_data_blob(NULL, hex_challenge);
+                       opt_challenge = strhex_to_data_blob(frame,
+                                                           hex_challenge);
                        if (opt_challenge.length != 8) {
                                fprintf(stderr, "hex decode of %s failed! "
                                        "(got %d bytes, expected 8)\n",
@@ -2744,7 +2745,8 @@ enum {
                        }
                        break;
                case OPT_LM:
-                       opt_lm_response = strhex_to_data_blob(NULL, hex_lm_response);
+                       opt_lm_response = strhex_to_data_blob(frame,
+                                                             hex_lm_response);
                        if (opt_lm_response.length != 24) {
                                fprintf(stderr, "hex decode of %s failed! "
                                        "(got %d bytes, expected 24)\n",
@@ -2755,7 +2757,8 @@ enum {
                        break;
 
                case OPT_NT:
-                       opt_nt_response = strhex_to_data_blob(NULL, hex_nt_response);
+                       opt_nt_response = strhex_to_data_blob(frame,
+                                                             hex_nt_response);
                        if (opt_nt_response.length < 24) {
                                fprintf(stderr, "hex decode of %s failed! "
                                        "(only got %d bytes, needed at least 24)\n",