aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupnotices.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelgroupnotices.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/newview/llpanelgroupnotices.cpp b/linden/indra/newview/llpanelgroupnotices.cpp
index b8b2f2c..2a7cdf5 100644
--- a/linden/indra/newview/llpanelgroupnotices.cpp
+++ b/linden/indra/newview/llpanelgroupnotices.cpp
@@ -50,6 +50,8 @@
50#include "llviewerwindow.h" 50#include "llviewerwindow.h"
51#include "llviewermessage.h" 51#include "llviewermessage.h"
52 52
53const S32 NOTICE_DATE_STRING_SIZE = 30;
54
53///////////////////////// 55/////////////////////////
54// LLPanelGroupNotices // 56// LLPanelGroupNotices //
55///////////////////////// 57/////////////////////////
@@ -181,8 +183,7 @@ char* build_notice_date(const time_t& the_time, char* buffer)
181 tm* lt = localtime(&t); 183 tm* lt = localtime(&t);
182 //for some reason, the month is off by 1. See other uses of 184 //for some reason, the month is off by 1. See other uses of
183 //"local" time in the code... 185 //"local" time in the code...
184 sprintf(buffer,"%i/%i/%i", lt->tm_mon + 1, lt->tm_mday, lt->tm_year + 1900); 186 snprintf(buffer, NOTICE_DATE_STRING_SIZE, "%i/%i/%i", lt->tm_mon + 1, lt->tm_mday, lt->tm_year + 1900); /*Flawfinder: ignore*/
185
186 return buffer; 187 return buffer;
187} 188}
188 189
@@ -447,8 +448,8 @@ void LLPanelGroupNotices::processGroupNoticesListReply(LLMessageSystem* msg, voi
447void LLPanelGroupNotices::processNotices(LLMessageSystem* msg) 448void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
448{ 449{
449 LLUUID id; 450 LLUUID id;
450 char subj[MAX_STRING]; 451 char subj[MAX_STRING]; /*Flawfinder: ignore*/
451 char name[MAX_STRING]; 452 char name[MAX_STRING]; /*Flawfinder: ignore*/
452 U32 timestamp; 453 U32 timestamp;
453 BOOL has_attachment; 454 BOOL has_attachment;
454 U8 asset_type; 455 U8 asset_type;
@@ -492,12 +493,12 @@ void LLPanelGroupNotices::processNotices(LLMessageSystem* msg)
492 row["columns"][2]["column"] = "from"; 493 row["columns"][2]["column"] = "from";
493 row["columns"][2]["value"] = name; 494 row["columns"][2]["value"] = name;
494 495
495 char buffer[30]; 496 char buffer[NOTICE_DATE_STRING_SIZE]; /*Flawfinder: ignore*/
496 build_notice_date(t, buffer); 497 build_notice_date(t, buffer);
497 row["columns"][3]["column"] = "date"; 498 row["columns"][3]["column"] = "date";
498 row["columns"][3]["value"] = buffer; 499 row["columns"][3]["value"] = buffer;
499 500
500 snprintf(buffer, 30, "%u", timestamp); 501 snprintf(buffer, 30, "%u", timestamp); /*Flawfinder: ignore*/
501 row["columns"][4]["column"] = "sort"; 502 row["columns"][4]["column"] = "sort";
502 row["columns"][4]["value"] = buffer; 503 row["columns"][4]["value"] = buffer;
503 504
@@ -522,7 +523,7 @@ void LLPanelGroupNotices::onSelectNotice(LLUICtrl* ctrl, void* data)
522 msg->addUUID("GroupNoticeID",item->getUUID()); 523 msg->addUUID("GroupNoticeID",item->getUUID());
523 gAgent.sendReliableMessage(); 524 gAgent.sendReliableMessage();
524 525
525 lldebugs << "Item " << item->getUUID().getString().c_str() << " selected." << llendl; 526 lldebugs << "Item " << item->getUUID() << " selected." << llendl;
526} 527}
527 528
528void LLPanelGroupNotices::showNotice(const char* subject, 529void LLPanelGroupNotices::showNotice(const char* subject,