summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-24 14:52:01 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-24 14:52:01 +0000
commit3e02ce14f6cce63910b266655a9c33bd3a70f17a (patch)
tree8fcf4371ea0d10693e7697f305d51988484faf69 /plugins/SecureIM/src
parent107471fac771abe5774d10769e36c0903a908685 (diff)
replace sprintf to mir_snprintf (part 4)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/src')
-rw-r--r--plugins/SecureIM/src/svcs_proto.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp
index 633812e802..310b2c9505 100644
--- a/plugins/SecureIM/src/svcs_proto.cpp
+++ b/plugins/SecureIM/src/svcs_proto.cpp
@@ -802,11 +802,12 @@ INT_PTR __cdecl onSendFile(WPARAM wParam, LPARAM lParam)
if (!name ) name = file[i];
else name++;
- char *file_out = (char*) mir_alloc(TEMP_SIZE+strlen(name)+20);
- sprintf(file_out,"%s\\%s.AESHELL(%d)",TEMP,name,file_idx++);
+ int size = TEMP_SIZE + strlen(name) + 20;
+ char *file_out = (char *)mir_alloc(size);
+ mir_snprintf(file_out, size, "%s\\%s.AESHELL(%d)", TEMP, name, file_idx++);
char buf[MAX_PATH];
- sprintf(buf,"%s\n%s",Translate(sim011),file[i]);
+ mir_snprintf(buf, SIZEOF(buf), "%s\n%s", Translate(sim011), file[i]);
showPopup(buf,NULL,g_hPOP[POP_PU_MSS],2);
if (ptr->mode == MODE_RSAAES)
@@ -896,12 +897,12 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam)
pos=p;
}
for (int i=1;i<10000;i++) {
- sprintf(pos," (%d)%s",i,buf);
+ sprintf(pos," (%d)%s",i,buf); //!!!!!!!!!!!!!
if (!isFileExist(file_out)) break;
}
}
- sprintf(buf,"%s\n%s",Translate(sim012),file_out);
+ mir_snprintf(buf, SIZEOF(buf), "%s\n%s", Translate(sim012), file_out);
showPopup(buf,NULL,g_hPOP[POP_PU_MSR],2);
if (ptr->mode == MODE_RSAAES )