codycam: Fix -Wformat-security
Change-Id: I6dfaebc1cfa8b9881bd25c2105cc949ca0711108 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3326 Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
e0264ea1c4
commit
6b48b59daf
@@ -448,10 +448,11 @@ FtpClient::_SendRequest(const string& cmd)
|
|||||||
string ccmd = cmd;
|
string ccmd = cmd;
|
||||||
|
|
||||||
if (fControl != 0) {
|
if (fControl != 0) {
|
||||||
if (cmd.find("PASS") != string::npos)
|
if (cmd.find("PASS") != string::npos) {
|
||||||
printf(B_TRANSLATE("PASS <suppressed> (real password sent)\n"));
|
puts(B_TRANSLATE("PASS <suppressed> (real password sent)"));
|
||||||
else
|
} else {
|
||||||
printf("%s\n", ccmd.c_str());
|
puts(ccmd.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
ccmd += "\r\n";
|
ccmd += "\r\n";
|
||||||
if (fControl->Send(ccmd.c_str(), ccmd.length()) >= 0)
|
if (fControl->Send(ccmd.c_str(), ccmd.length()) >= 0)
|
||||||
@@ -549,8 +550,8 @@ FtpClient::_GetReply(string& outString, int& outCode, int& codeType)
|
|||||||
rc = _GetReplyLine(line);
|
rc = _GetReplyLine(line);
|
||||||
if (rc == true) {
|
if (rc == true) {
|
||||||
outString = line;
|
outString = line;
|
||||||
|
puts(outString.c_str());
|
||||||
outString += '\n';
|
outString += '\n';
|
||||||
printf(outString.c_str());
|
|
||||||
tempString = line.substr(0, 3);
|
tempString = line.substr(0, 3);
|
||||||
outCode = atoi(tempString.c_str());
|
outCode = atoi(tempString.c_str());
|
||||||
|
|
||||||
@@ -558,8 +559,8 @@ FtpClient::_GetReply(string& outString, int& outCode, int& codeType)
|
|||||||
rc = _GetReplyLine(line);
|
rc = _GetReplyLine(line);
|
||||||
while (rc == true) {
|
while (rc == true) {
|
||||||
outString += line;
|
outString += line;
|
||||||
|
puts(outString.c_str());
|
||||||
outString += '\n';
|
outString += '\n';
|
||||||
printf(outString.c_str());
|
|
||||||
// we're done with nnn when we get to a "nnn blahblahblah"
|
// we're done with nnn when we get to a "nnn blahblahblah"
|
||||||
if ((line.find(tempString) == 0) && line[3] == ' ')
|
if ((line.find(tempString) == 0) && line[3] == ' ')
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user