Fixed a possible array subscript overflow.

This commit is contained in:
Michiel Broek 2009-07-03 20:59:41 +02:00
parent db54b7727c
commit 338b1b3265
4 changed files with 13 additions and 4 deletions

View File

@ -9,6 +9,15 @@ v0.95.5 29-Nov-2008
Newsservers can be connected with a port number from the Newsservers can be connected with a port number from the
setup. setup.
mbfido:
Fixed a possible array subscript overflow.
mbaff:
Fixed a possible array subscript overflow.
mbfile:
Fixed a possible array subscript overflow.
mbsetup: mbsetup:
In screen 1.12 a nntp port number can be set. In screen 1.12 a nntp port number can be set.
Added a switch to force authentication on connect with nntp Added a switch to force authentication on connect with nntp

View File

@ -118,7 +118,7 @@ void Uploads()
for (j = 0; j < 25; j++) { for (j = 0; j < 25; j++) {
if (strlen(fdb.Desc[j])) { if (strlen(fdb.Desc[j])) {
snprintf(T_File.LDesc[k], 49, "%s", 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++; k++;
} }
} }

View File

@ -316,7 +316,7 @@ void ImportFiles(int Area)
line++; line++;
pos = 0; pos = 0;
} else { } else {
if (pos == 49) { if (pos == 48) {
f_db.Desc[line][pos] = '\0'; f_db.Desc[line][pos] = '\0';
pos = 0; pos = 0;
line++; line++;
@ -371,7 +371,7 @@ void ImportFiles(int Area)
line++; line++;
pos = 0; pos = 0;
} else { } else {
if (pos == 49) { if (pos == 48) {
f_db.Desc[line][pos] = '\0'; f_db.Desc[line][pos] = '\0';
pos = 0; pos = 0;
line++; line++;

View File

@ -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, * Add all our system aka's to the seenby lines in the same zone,
* omit aka's already in the seenby list. * 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)) { if (CFG.akavalid[i] && (tic.Aka.zone == CFG.aka[i].zone)) {
p_from = fido2faddr(CFG.aka[i]); p_from = fido2faddr(CFG.aka[i]);
if (! in_list(p_from, sbl, TRUE)) { if (! in_list(p_from, sbl, TRUE)) {