Debian Codegraph @

debian/patches/fix_maxuflags

raw
1 --- a/ifcico/nodelist.c
2 +++ b/ifcico/nodelist.c
3 @@ -208,7 +208,7 @@ faddr *addr;
4 debug(20,"getnlent: phone %s",nodebuf.phone);
5 debug(20,"getnlent: speed %u",nodebuf.speed);
6 debug(20,"getnlent: flags 0x%lx",nodebuf.flags);
7 - for (j=0;nodebuf.uflags[j];j++)
8 + for (j=0; (j < MAXUFLAGS) && (nodebuf.uflags[j]); j++)
9 debug(20,"getnlent: uflag %s",nodebuf.uflags[j]);
10
11 return &nodebuf;
12 --- a/ifcico/ifinfo.c
13 +++ b/ifcico/ifinfo.c
14 @@ -102,7 +102,7 @@ int main(int argc, char *argv[])
15
16 /* get user nodelist flags */
17 flagbuf[0] = 0;
18 - for (i = 0; nlent->uflags[i]; i++)
19 + for (i = 0; (i < MAXUFLAGS) && (nlent->uflags[i]); i++)
20 {
21 sprintf(flagbuf + strlen(flagbuf), "%s,", nlent->uflags[i]);
22 }