Fixed a possible array subscript overflow.

This commit is contained in:
Michiel Broek 2009-07-03 20:59:41 +02:00
parent 3a4cb235b1
commit 1ad3bd46ce
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
setup.
mbfido:
Fixed a possible array subscript overflow.
mbaff:
Fixed a possible array subscript overflow.
mbfile:
Fixed a possible array subscript overflow.
mbsetup:
In screen 1.12 a nntp port number can be set.
Added a switch to force authentication on connect with nntp

View File

@ -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++;
}
}

View File

@ -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++;

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,
* 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)) {