Fossil SCM

Replace an mprintf() with fossil_strdup().

stephan 2025-07-21 18:42 xfer-login-card
Commit 73a2bd06b1ff70c94d6cf61f00ce80ae1f76bda4e5ae9826909adc24c6fd91e1
1 file changed +1 -1
+1 -1
--- src/http.c
+++ src/http.c
@@ -636,11 +636,11 @@
636636
}else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
637637
isError = 1;
638638
}
639639
}
640640
}else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){
641
- g.zLoginCard = mprintf("%s", &zLine[21]);
641
+ g.zLoginCard = fossil_strdup(&zLine[21]);
642642
}
643643
}
644644
if( iHttpVersion<0 ){
645645
/* We got nothing back from the server. If using the ssh: protocol,
646646
** this might mean we need to add or remove the PATH=... argument
647647
--- src/http.c
+++ src/http.c
@@ -636,11 +636,11 @@
636 }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
637 isError = 1;
638 }
639 }
640 }else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){
641 g.zLoginCard = mprintf("%s", &zLine[21]);
642 }
643 }
644 if( iHttpVersion<0 ){
645 /* We got nothing back from the server. If using the ssh: protocol,
646 ** this might mean we need to add or remove the PATH=... argument
647
--- src/http.c
+++ src/http.c
@@ -636,11 +636,11 @@
636 }else if( fossil_strnicmp(&zLine[14], "application/x-fossil", -1)!=0 ){
637 isError = 1;
638 }
639 }
640 }else if( fossil_strnicmp(zLine, "x-fossil-xfer-login: ", 21)==0 ){
641 g.zLoginCard = fossil_strdup(&zLine[21]);
642 }
643 }
644 if( iHttpVersion<0 ){
645 /* We got nothing back from the server. If using the ssh: protocol,
646 ** this might mean we need to add or remove the PATH=... argument
647

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button