aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelgroupvoting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpanelgroupvoting.cpp')
-rw-r--r--linden/indra/newview/llpanelgroupvoting.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/linden/indra/newview/llpanelgroupvoting.cpp b/linden/indra/newview/llpanelgroupvoting.cpp
index 1be6bf0..ebe99b1 100644
--- a/linden/indra/newview/llpanelgroupvoting.cpp
+++ b/linden/indra/newview/llpanelgroupvoting.cpp
@@ -330,8 +330,8 @@ void LLPanelGroupVoting::impl::setEnableVoteProposal()
330 330
331 if (already_voted == "Yes") 331 if (already_voted == "Yes")
332 { 332 {
333 char message[MAX_STRING]; 333 char message[MAX_STRING]; /*Flawfinder: ignore*/
334 sprintf(message, "You have voted: %s ", vote_cast.c_str()); 334 snprintf(message, MAX_STRING, "You have voted: %s ", vote_cast.c_str()); /*Flawfinder: ignore*/
335 mInstructions->setText(message); 335 mInstructions->setText(message);
336 336
337 mBtnYes->setEnabled(FALSE); 337 mBtnYes->setEnabled(FALSE);
@@ -641,8 +641,8 @@ void LLPanelGroupVoting::impl::updateQuorumText()
641 if ( mQuorumText ) 641 if ( mQuorumText )
642 { 642 {
643 //update the quorum count 643 //update the quorum count
644 char quorum_text[MAX_STRING]; 644 char quorum_text[MAX_STRING]; /*Flawfinder: ignore*/
645 sprintf(quorum_text, 645 snprintf(quorum_text, MAX_STRING, /*Flawfinder: ignore*/
646 " out of %d members must vote", 646 " out of %d members must vote",
647 mNumGroupMembers); 647 mNumGroupMembers);
648 mQuorumText->setText(quorum_text); 648 mQuorumText->setText(quorum_text);
@@ -737,15 +737,15 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
737 737
738 U32 num_expected; 738 U32 num_expected;
739 const S32 MAX_STRING_NUM_LEN = 20; 739 const S32 MAX_STRING_NUM_LEN = 20;
740 char item_num_string[DB_TERSE_DATETIME_BUF_SIZE]; 740 char item_num_string[DB_TERSE_DATETIME_BUF_SIZE]; /*Flawfinder: ignore*/
741 char proposal_text[DB_VOTE_TEXT_BUF_SIZE]; 741 char proposal_text[DB_VOTE_TEXT_BUF_SIZE]; /*Flawfinder: ignore*/
742 char vote_cast[DB_VOTE_RESULT_BUF_SIZE]; 742 char vote_cast[DB_VOTE_RESULT_BUF_SIZE]; /*Flawfinder: ignore*/
743 char start_datetime[DB_DATETIME_BUF_SIZE]; 743 char start_datetime[DB_DATETIME_BUF_SIZE]; /*Flawfinder: ignore*/
744 char end_datetime[DB_DATETIME_BUF_SIZE]; 744 char end_datetime[DB_DATETIME_BUF_SIZE]; /*Flawfinder: ignore*/
745 char vote_type[DB_VOTE_TYPE_BUF_SIZE]; 745 char vote_type[DB_VOTE_TYPE_BUF_SIZE]; /*Flawfinder: ignore*/
746 char majority_text[MAX_STRING_NUM_LEN]; 746 char majority_text[MAX_STRING_NUM_LEN]; /*Flawfinder: ignore*/
747 char quorum_text[MAX_STRING_NUM_LEN]; 747 char quorum_text[MAX_STRING_NUM_LEN]; /*Flawfinder: ignore*/
748 char vote_initiator_string[UUID_STR_LENGTH]; 748 char vote_initiator_string[UUID_STR_LENGTH]; /*Flawfinder: ignore*/
749 749
750 LLUUID vote_id; 750 LLUUID vote_id;
751 LLUUID vote_initiator; 751 LLUUID vote_initiator;
@@ -778,8 +778,8 @@ void LLPanelGroupVoting::impl::processGroupActiveProposalItemReply(LLMessageSyst
778 msg->getS32Fast(_PREHASH_ProposalData, _PREHASH_Quorum, quorum, i ); 778 msg->getS32Fast(_PREHASH_ProposalData, _PREHASH_Quorum, quorum, i );
779 779
780 vote_initiator.toString(vote_initiator_string); 780 vote_initiator.toString(vote_initiator_string);
781 sprintf(majority_text, "%f", majority); 781 snprintf(majority_text, MAX_STRING_NUM_LEN, "%f", majority); /*Flawfinder: ignore*/
782 sprintf(quorum_text, "%i", quorum); 782 snprintf(quorum_text, MAX_STRING_NUM_LEN, "%i", quorum); /*Flawfinder: ignore*/
783 783
784 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, vote_id ); 784 LLScrollListItem *row = new LLScrollListItem( TRUE, NULL, vote_id );
785 if (!row) return; 785 if (!row) return;
@@ -879,12 +879,12 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
879 } 879 }
880 880
881 const S32 ITEM_NUM_MAX_BUF_LEN = 15; 881 const S32 ITEM_NUM_MAX_BUF_LEN = 15;
882 char item_num_string[ITEM_NUM_MAX_BUF_LEN]; 882 char item_num_string[ITEM_NUM_MAX_BUF_LEN]; /*Flawfinder: ignore*/
883 char proposal_text[DB_VOTE_TEXT_BUF_SIZE]; 883 char proposal_text[DB_VOTE_TEXT_BUF_SIZE]; /*Flawfinder: ignore*/
884 char vote_result[MAX_STRING]; 884 char vote_result[MAX_STRING]; /*Flawfinder: ignore*/
885 char start_datetime[DB_DATETIME_BUF_SIZE]; 885 char start_datetime[DB_DATETIME_BUF_SIZE]; /*Flawfinder: ignore*/
886 char end_datetime[DB_DATETIME_BUF_SIZE]; 886 char end_datetime[DB_DATETIME_BUF_SIZE]; /*Flawfinder: ignore*/
887 char vote_type[DB_VOTE_TYPE_BUF_SIZE]; 887 char vote_type[DB_VOTE_TYPE_BUF_SIZE]; /*Flawfinder: ignore*/
888 888
889 LLString vote_text; 889 LLString vote_text;
890 LLUUID vote_id; 890 LLUUID vote_id;
@@ -927,15 +927,15 @@ void LLPanelGroupVoting::impl::processGroupVoteHistoryItemReply(LLMessageSystem
927 } 927 }
928 vote_text.append(" Votes->\n"); 928 vote_text.append(" Votes->\n");
929 929
930 char vote_result[DB_VOTE_RESULT_BUF_SIZE]; 930 char vote_result[DB_VOTE_RESULT_BUF_SIZE]; /*Flawfinder: ignore*/
931 char result_msg[MAX_STRING]; 931 char result_msg[MAX_STRING]; /*Flawfinder: ignore*/
932 S32 num_votes; 932 S32 num_votes;
933 933
934 for (S32 i = 0; i < vote_items; ++i) 934 for (S32 i = 0; i < vote_items; ++i)
935 { 935 {
936 msg->getStringFast(_PREHASH_VoteItem, _PREHASH_VoteCast, DB_VOTE_RESULT_BUF_SIZE, vote_result, i); 936 msg->getStringFast(_PREHASH_VoteItem, _PREHASH_VoteCast, DB_VOTE_RESULT_BUF_SIZE, vote_result, i);
937 msg->getS32Fast(_PREHASH_VoteItem, _PREHASH_NumVotes, num_votes, i); 937 msg->getS32Fast(_PREHASH_VoteItem, _PREHASH_NumVotes, num_votes, i);
938 sprintf(result_msg, 938 snprintf(result_msg, MAX_STRING, /*Flawfinder: ignore*/
939 " %s: %d\n", 939 " %s: %d\n",
940 vote_result, 940 vote_result,
941 num_votes); 941 num_votes);