- client: correctly null-terminate file upload handler reply

- web: fix typo

svn path=/trunk/boinc/; revision=16189
This commit is contained in:
David Anderson 2008-10-11 18:13:33 +00:00
parent 5957d58668
commit a42ba237f3
3 changed files with 13 additions and 4 deletions

View File

@ -8290,3 +8290,12 @@ David 10 Oct 2008
client/
app.cpp
client_types.cpp
David 10 Oct 2008
- client: correctly null-terminate file upload handler reply
- web: fix typo
client/
http_curl.cpp
html/user/
forum_post.php

View File

@ -1065,8 +1065,8 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) {
);
} else {
strcpy(req1, "");
if (dSize > (size_t)req1_len) {
dSize = req1_len;
if (dSize >= (size_t)req1_len) {
dSize = req1_len-1;
}
size_t nread = fread(req1, 1, dSize, fileOut);
if (nread != dSize) {
@ -1077,7 +1077,7 @@ void HTTP_OP::handle_messages(CURLMsg *pcurlMsg) {
);
}
}
req1[req1_len-1] = 0; // make sure null-terminated
req1[nread] = 0;
}
}

View File

@ -50,7 +50,7 @@ if ($content && $title && (!$preview)){
$warning = "Your message was flagged as spam by the Akismet
anti-spam system. Please modify your text and try again.
";
preview = tra("Preview");
$preview = tra("Preview");
} else {
$thread = create_thread(
$title, $content, $logged_in_user, $forum, $add_signature