Fixed a possible array subscript overflow.
This commit is contained in:
@@ -118,7 +118,7 @@ void Uploads()
|
||||
for (j = 0; j < 25; j++) {
|
||||
if (strlen(fdb.Desc[j])) {
|
||||
snprintf(T_File.LDesc[k], 49, "%s", fdb.Desc[j]);
|
||||
T_File.LDesc[k][49] = '\0';
|
||||
T_File.LDesc[k][48] = '\0';
|
||||
k++;
|
||||
}
|
||||
}
|
||||
|
@@ -316,7 +316,7 @@ void ImportFiles(int Area)
|
||||
line++;
|
||||
pos = 0;
|
||||
} else {
|
||||
if (pos == 49) {
|
||||
if (pos == 48) {
|
||||
f_db.Desc[line][pos] = '\0';
|
||||
pos = 0;
|
||||
line++;
|
||||
@@ -371,7 +371,7 @@ void ImportFiles(int Area)
|
||||
line++;
|
||||
pos = 0;
|
||||
} else {
|
||||
if (pos == 49) {
|
||||
if (pos == 48) {
|
||||
f_db.Desc[line][pos] = '\0';
|
||||
pos = 0;
|
||||
line++;
|
||||
|
@@ -664,7 +664,7 @@ int ProcessTic(fa_list **sbl, orphans **opl)
|
||||
* Add all our system aka's to the seenby lines in the same zone,
|
||||
* omit aka's already in the seenby list.
|
||||
*/
|
||||
for (i = 0; i < 40; i++) {
|
||||
for (i = 0; i < 39; i++) {
|
||||
if (CFG.akavalid[i] && (tic.Aka.zone == CFG.aka[i].zone)) {
|
||||
p_from = fido2faddr(CFG.aka[i]);
|
||||
if (! in_list(p_from, sbl, TRUE)) {
|
||||
|
Reference in New Issue
Block a user