-
Notifications
You must be signed in to change notification settings - Fork 17
Description
File: swad_mail.c:894
Problem: Variable StrAddresses is used without been initialized. This array is declared as
char StrAddresses[Mai_MAX_LENGTH_STR_ADDR + 1];
If it is not the first email a coma is appended but the first address will be appended to an array containing garbage.
The C standard ensures that at global scope or using static definition the value will be 0, but within a scope, the array must be initialized.
char StrAddresses[Mai_MAX_LENGTH_STR_ADDR + 1] = {0};
File: swad_mark.c:844
Problem: FILE* FileUsrMarks is getting closed twice.
File: swad_indicator.c:1398
Problem: Returning an uninitialized integer. The function Ind_GetNumIndicatorsCrsFromDB is returning the local variable NumIndicatorsFromDB that it may be Uninitialized if the DB_QuerySELECT fails.
File: Various.
Problem: fprintf and family are getting called with the %u string but the variable is a signed integer, this is not a big issue, but it may produce problems if the input comes from an user.