diff --git a/swad_ID.c b/swad_ID.c index fe456c0b2..2a13accfc 100644 --- a/swad_ID.c +++ b/swad_ID.c @@ -816,15 +816,16 @@ static void ID_RemoveUsrID (const struct UsrData *UsrDat,bool ItsMe) { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = ID_ID_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_delete_this_ID); + Str_Copy (Gbl.Alert.Txt,Txt_You_can_not_delete_this_ID, + Ale_MAX_BYTES_ALERT); } } else { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = ID_ID_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } @@ -994,8 +995,8 @@ static void ID_NewUsrID (const struct UsrData *UsrDat,bool ItsMe) { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = ID_ID_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } @@ -1094,16 +1095,16 @@ void ID_ConfirmOtherUsrID (void) { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = ID_ID_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } else // I can not confirm { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = ID_ID_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } /***** Show one or multiple records *****/ diff --git a/swad_centre.c b/swad_centre.c index e228e81d4..1b04fa85a 100644 --- a/swad_centre.c +++ b/swad_centre.c @@ -1892,7 +1892,8 @@ void Ctr_ChangeCtrPlc (void) /***** Write message to show the change made and put button to go to centre changed *****/ Gbl.Alert.Type = Ale_SUCCESS; - sprintf (Gbl.Alert.Txt,"%s",Txt_The_place_of_the_centre_has_changed); + Str_Copy (Gbl.Alert.Txt,Txt_The_place_of_the_centre_has_changed, + Ale_MAX_BYTES_ALERT); Ctr_ShowAlertAndButtonToGoToCtr (); /***** Show the form again *****/ @@ -2769,16 +2770,10 @@ static void Ctr_RecFormRequestOrCreateCtr (unsigned Status) Ctr_CreateCentre (Status); } else // If there is not a web - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_centre); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_centre); } else // If there is not a centre name - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_centre); /***** Show the form again *****/ Ctr_EditCentres (); diff --git a/swad_changelog.h b/swad_changelog.h index e68b966c7..45896c1b1 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -355,10 +355,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.5.2 (2018-10-16)" +#define Log_PLATFORM_VERSION "SWAD 18.5.3 (2018-10-16)" #define CSS_FILE "swad18.4.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.5.3: Oct 16, 2018 sprintf changed by safe string copy in some alerts. (235198 lines) Version 18.5.2: Oct 16, 2018 Code refactoring related to password change. (235170 lines) Version 18.5.1: Oct 16, 2018 Code refactoring related to edition of another user's account. (235212 lines) Version 18.5: Oct 16, 2018 Changes in management of other users. (235292 lines) diff --git a/swad_course.c b/swad_course.c index f920e296b..8ed884437 100644 --- a/swad_course.c +++ b/swad_course.c @@ -1880,7 +1880,8 @@ static void Crs_RecFormRequestOrCreateCrs (unsigned Status) else // If there is not a course name { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_course); + Str_Copy (Gbl.Alert.Txt,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_course, + Ale_MAX_BYTES_ALERT); } } else // Year not valid @@ -2343,7 +2344,8 @@ void Crs_ChangeInsCrsCod (void) else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course); + Str_Copy (Gbl.Alert.Txt,Txt_You_dont_have_permission_to_edit_this_course, + Ale_MAX_BYTES_ALERT); } } @@ -2547,7 +2549,8 @@ void Crs_ChangeCrsYear (void) else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course); + Str_Copy (Gbl.Alert.Txt,Txt_You_dont_have_permission_to_edit_this_course, + Ale_MAX_BYTES_ALERT); } } @@ -2704,7 +2707,8 @@ static void Crs_RenameCourse (struct Course *Crs,Cns_ShrtOrFullName_t ShrtOrFull else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_dont_have_permission_to_edit_this_course); + Str_Copy (Gbl.Alert.Txt,Txt_You_dont_have_permission_to_edit_this_course, + Ale_MAX_BYTES_ALERT); } } diff --git a/swad_degree.c b/swad_degree.c index 368229e80..d812cae3d 100644 --- a/swad_degree.c +++ b/swad_degree.c @@ -1574,16 +1574,10 @@ static void Deg_RecFormRequestOrCreateDeg (unsigned Status) Deg_CreateDegree (Status); } else // If there is not a degree logo or web - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_degree); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_degree); } else // If there is not a degree name - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_degree); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_degree); /***** Show the form again *****/ Deg_EditDegrees (); diff --git a/swad_degree_type.c b/swad_degree_type.c index 3e8772bbd..30d73fc4a 100644 --- a/swad_degree_type.c +++ b/swad_degree_type.c @@ -728,10 +728,7 @@ void DT_RecFormNewDegreeType (void) DT_CreateDegreeType (DegTyp); } else // If there is not a degree type name - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_type_of_degree); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_name_of_the_new_type_of_degree); /***** Show the form again *****/ DT_EditDegreeTypes (); diff --git a/swad_department.c b/swad_department.c index b6e81f9c0..f11e8471e 100644 --- a/swad_department.c +++ b/swad_department.c @@ -837,10 +837,7 @@ void Dpt_ChangeDptWWW (void) Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); } else - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_can_not_leave_the_web_address_empty); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_can_not_leave_the_web_address_empty); /***** Show the form again *****/ Str_Copy (Dpt->WWW,NewWWW, @@ -1038,16 +1035,10 @@ void Dpt_RecFormNewDpt (void) Dpt_CreateDepartment (Dpt); } else // If there is not a web - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_web_address_of_the_new_department); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_web_address_of_the_new_department); } else // If there is not a department name - { - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_department); - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); - } + Ale_ShowAlert (Ale_WARNING,Txt_You_must_specify_the_short_name_and_the_full_name_of_the_new_department); /***** Show the form again *****/ Dpt_EditDepartments (); diff --git a/swad_enrolment.c b/swad_enrolment.c index 6939a34ea..4e8c5d7bd 100644 --- a/swad_enrolment.c +++ b/swad_enrolment.c @@ -3486,13 +3486,15 @@ void Enr_RemUsrFromCrs1 (void) else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } } @@ -4222,7 +4224,8 @@ static void Enr_EffectivelyRemUsrFromCrs (struct UsrData *UsrDat,struct Course * if (QuietOrVerbose == Cns_VERBOSE) { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } diff --git a/swad_file_browser.c b/swad_file_browser.c index 0dec4985b..c9cd2dad0 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -9291,8 +9291,10 @@ void Brw_RcvFileInFileBrwDropzone (void) void Brw_RcvFileInFileBrwClassic (void) { /***** Receive file and show feedback message *****/ - if (!Brw_RcvFileInFileBrw (Brw_CLASSIC_UPLOAD)) - Ale_ShowAlert (Ale_WARNING,Gbl.Alert.Txt); + Brw_RcvFileInFileBrw (Brw_CLASSIC_UPLOAD); + + /***** Show possible alert *****/ + Ale_ShowPendingAlert (); /***** Show again file browser *****/ Brw_ShowAgainFileBrowserOrWorks (); @@ -9363,6 +9365,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) /* Check if the destination file exists */ if (Fil_CheckIfPathExists (Path)) { + Gbl.Alert.Type = Ale_WARNING; sprintf (Gbl.Alert.Txt,Txt_UPLOAD_FILE_X_file_already_exists_NO_HTML, Gbl.FileBrowser.NewFilFolLnkName); } @@ -9384,6 +9387,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) if (rename (PathTmp,Path)) // Fail { Fil_RemoveTree (PathTmp); + Gbl.Alert.Type = Ale_WARNING; sprintf (Gbl.Alert.Txt,Txt_UPLOAD_FILE_could_not_create_file_NO_HTML, Gbl.FileBrowser.NewFilFolLnkName); } @@ -9395,6 +9399,7 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) if (Brw_CheckIfQuotaExceded ()) { Fil_RemoveTree (Path); + Gbl.Alert.Type = Ale_WARNING; sprintf (Gbl.Alert.Txt,Txt_UPLOAD_FILE_X_quota_exceeded_NO_HTML, Gbl.FileBrowser.NewFilFolLnkName); } @@ -9423,10 +9428,10 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) Brw_IS_FOLDER, Gbl.FileBrowser.FilFolLnkName, FileNameToShow); + Gbl.Alert.Type = Ale_SUCCESS; sprintf (Gbl.Alert.Txt,Txt_The_file_X_has_been_placed_inside_the_folder_Y, Gbl.FileBrowser.NewFilFolLnkName, FileNameToShow); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); } UploadSucessful = true; @@ -9470,10 +9475,18 @@ static bool Brw_RcvFileInFileBrw (Brw_UploadType_t UploadType) } } else // Empty filename - sprintf (Gbl.Alert.Txt,"%s",Txt_UPLOAD_FILE_You_must_specify_the_file_NO_HTML); + { + Gbl.Alert.Type = Ale_WARNING; + Str_Copy (Gbl.Alert.Txt,Txt_UPLOAD_FILE_You_must_specify_the_file_NO_HTML, + Ale_MAX_BYTES_ALERT); + } } else // I do not have permission to create files here - sprintf (Gbl.Alert.Txt,"%s",Txt_UPLOAD_FILE_Forbidden_NO_HTML); + { + Gbl.Alert.Type = Ale_WARNING; + Str_Copy (Gbl.Alert.Txt,Txt_UPLOAD_FILE_Forbidden_NO_HTML, + Ale_MAX_BYTES_ALERT); + } return UploadSucessful; } diff --git a/swad_follow.c b/swad_follow.c index 535021927..c6d7c3241 100644 --- a/swad_follow.c +++ b/swad_follow.c @@ -1045,7 +1045,8 @@ void Fol_FollowUsr1 (void) else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } @@ -1058,7 +1059,8 @@ void Fol_FollowUsr2 (void) if (!Prf_ShowUserProfile (&Gbl.Usrs.Other.UsrDat)) { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } if (Gbl.Alert.Type != Ale_SUCCESS) @@ -1093,7 +1095,8 @@ void Fol_UnfollowUsr1 (void) else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } diff --git a/swad_forum.c b/swad_forum.c index cdad051c0..2efeedba1 100644 --- a/swad_forum.c +++ b/swad_forum.c @@ -4165,8 +4165,8 @@ void For_RequestRemoveThread (void) sprintf (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_entire_thread_X, Subject); else - sprintf (Gbl.Alert.Txt,"%s", - Txt_Do_you_really_want_to_remove_the_entire_thread); + Str_Copy (Gbl.Alert.Txt,Txt_Do_you_really_want_to_remove_the_entire_thread, + Ale_MAX_BYTES_ALERT); Ale_ShowAlertAndButton (Ale_QUESTION,Gbl.Alert.Txt, For_ActionsDelThrFor[Gbl.Forum.ForumSelected.Type], For_FORUM_THREADS_SECTION_ID,NULL, diff --git a/swad_game.c b/swad_game.c index 8e4930695..32e78fa9a 100644 --- a/swad_game.c +++ b/swad_game.c @@ -3327,8 +3327,7 @@ void Gam_RemoveQst (void) DB_QueryUPDATE (Query,"can not update indexes of questions"); /***** Write message *****/ - sprintf (Gbl.Alert.Txt,"%s",Txt_Question_removed); - Ale_ShowAlert (Ale_SUCCESS,Gbl.Alert.Txt); + Ale_ShowAlert (Ale_SUCCESS,Txt_Question_removed); /***** Show current game *****/ Gam_ShowOneGame (Game.GamCod, diff --git a/swad_group.c b/swad_group.c index 366b6e300..cfc2e2707 100644 --- a/swad_group.c +++ b/swad_group.c @@ -671,19 +671,22 @@ void Grp_ChangeMyGrps (Cns_QuietOrVerbose_t QuietOrVerbose) if (ChangesMade) { Gbl.Alert.Type = Ale_SUCCESS; - sprintf (Gbl.Alert.Txt,"%s",Txt_The_requested_group_changes_were_successful); + Str_Copy (Gbl.Alert.Txt,Txt_The_requested_group_changes_were_successful, + Ale_MAX_BYTES_ALERT); } else { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_There_has_been_no_change_in_groups); + Str_Copy (Gbl.Alert.Txt,Txt_There_has_been_no_change_in_groups, + Ale_MAX_BYTES_ALERT); } } } else if (QuietOrVerbose == Cns_VERBOSE) { Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group); + Str_Copy (Gbl.Alert.Txt,Txt_In_a_type_of_group_with_single_enrolment_students_can_not_be_registered_in_more_than_one_group, + Ale_MAX_BYTES_ALERT); } /***** Free memory with the list of groups which I want to belong to *****/ @@ -3690,7 +3693,8 @@ void Grp_RecFormNewGrpTyp (void) else // If there is not a group type name { AlertType = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_type_of_group); + Str_Copy (Gbl.Alert.Txt,Txt_You_must_specify_the_name_of_the_new_type_of_group, + Ale_MAX_BYTES_ALERT); } /***** Show the form again *****/ @@ -3759,13 +3763,15 @@ void Grp_RecFormNewGrp (void) else // If there is not a group name { AlertType = Ale_ERROR; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_group); + Str_Copy (Gbl.Alert.Txt,Txt_You_must_specify_the_name_of_the_new_group, + Ale_MAX_BYTES_ALERT); } } else // Invalid group type { AlertType = Ale_ERROR; - sprintf (Gbl.Alert.Txt,"%s","Wrong type of group."); + Str_Copy (Gbl.Alert.Txt,"Wrong type of group.", + Ale_MAX_BYTES_ALERT); } /***** Show the form again *****/ @@ -4430,7 +4436,7 @@ void Grp_ChangeOpenTimeGrpTyp (void) DB_QueryUPDATE (Query,"can not update enrolment type of a type of group"); /***** Write message to show the change made *****/ - sprintf (Gbl.Alert.Txt,"%s",Txt_The_date_time_of_opening_of_groups_has_changed); + Ale_ShowAlert (Ale_SUCCESS,Txt_The_date_time_of_opening_of_groups_has_changed); /***** Show the form again *****/ Grp_ReqEditGroupsInternal (Ale_SUCCESS,Gbl.Alert.Txt, diff --git a/swad_holiday.c b/swad_holiday.c index 72d16edf9..34aa2e0a6 100644 --- a/swad_holiday.c +++ b/swad_holiday.c @@ -1158,7 +1158,8 @@ void Hld_RecFormNewHoliday1 (void) { /* Error message */ Gbl.Alert.Type = Ale_WARNING; - sprintf (Gbl.Alert.Txt,"%s",Txt_You_must_specify_the_name_of_the_new_holiday); + Str_Copy (Gbl.Alert.Txt,Txt_You_must_specify_the_name_of_the_new_holiday, + Ale_MAX_BYTES_ALERT); } } diff --git a/swad_mail.c b/swad_mail.c index c1e2a6cb6..92cf467ce 100644 --- a/swad_mail.c +++ b/swad_mail.c @@ -1208,7 +1208,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, { extern const char *The_ClassForm[The_NUM_THEMES]; extern const char *Txt_Please_fill_in_your_email_address; - extern const char *Txt_Please_check_and_confirm_your_email_address; + extern const char *Txt_Please_confirm_your_email_address; extern const char *Txt_Current_email; extern const char *Txt_Other_emails; extern const char *Txt_Email_X_confirmed; @@ -1234,7 +1234,7 @@ static void Mai_ShowFormChangeUsrEmail (const struct UsrData *UsrDat,bool ItsMe, if (IMustFillEmail) Ale_ShowAlert (Ale_WARNING,Txt_Please_fill_in_your_email_address); else if (IShouldConfirmEmail) - Ale_ShowAlert (Ale_WARNING,Txt_Please_check_and_confirm_your_email_address); + Ale_ShowAlert (Ale_WARNING,Txt_Please_confirm_your_email_address); /***** Get my emails *****/ sprintf (Query,"SELECT E_mail,Confirmed FROM usr_emails" @@ -1600,8 +1600,8 @@ static void Mai_NewUsrEmail (struct UsrData *UsrDat,bool ItsMe) { Gbl.Alert.Type = Ale_WARNING; Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_User_not_found_or_you_do_not_have_permission_); + Str_Copy (Gbl.Alert.Txt,Txt_User_not_found_or_you_do_not_have_permission_, + Ale_MAX_BYTES_ALERT); } } @@ -1654,13 +1654,13 @@ void Mai_PutButtonToCheckEmailAddress (void) { extern const char *Hlp_PROFILE_Account_email; extern const char *Txt_Email_unconfirmed; - extern const char *Txt_Please_check_and_confirm_your_email_address; + extern const char *Txt_Please_confirm_your_email_address; extern const char *Txt_Check; /***** Box with button to check email address *****/ Box_StartBox (NULL,Txt_Email_unconfirmed,NULL, Hlp_PROFILE_Account_email,Box_CLOSABLE); - Ale_ShowAlertAndButton (Ale_WARNING,Txt_Please_check_and_confirm_your_email_address, + Ale_ShowAlertAndButton (Ale_WARNING,Txt_Please_confirm_your_email_address, ActFrmMyAcc,NULL,NULL,NULL, Btn_CONFIRM_BUTTON,Txt_Check); Box_EndBox (); @@ -1737,8 +1737,8 @@ bool Mai_SendMailMsgToConfirmEmail (void) case 1: Gbl.Alert.Type = Ale_ERROR; Gbl.Alert.Section = Mai_EMAIL_SECTION_ID; - sprintf (Gbl.Alert.Txt,"%s", - Txt_There_was_a_problem_sending_an_email_automatically); + Str_Copy (Gbl.Alert.Txt,Txt_There_was_a_problem_sending_an_email_automatically, + Ale_MAX_BYTES_ALERT); return false; default: Gbl.Alert.Type = Ale_ERROR; diff --git a/swad_mark.c b/swad_mark.c index 73cafd8ea..4d555cac7 100644 --- a/swad_mark.c +++ b/swad_mark.c @@ -325,7 +325,9 @@ bool Mrk_CheckFileOfMarks (const char *Path,struct MarksProperties *Marks) // Only one table is allowed if (Str_FindStrInFile (FileAllMarks,"