pcmcia-check-broken-cis broken?
Dominik Brodowski
linux at dominikbrodowski.net
Sun Dec 25 04:06:35 EST 2005
Hi,
On Sat, Dec 24, 2005 at 12:03:36PM +0100, Boris Bliznioukov wrote:
> while (entry) {
> if (!entry->cisfile)
> return 0;
>
> // read the tuple
>
> if (strncmp((char *) tuple.TupleData, entry->info,
> strlen(entry->info)) != 0) {
> entry++;
> continue;
> }
>
> if (repair) {
> return repair_cis(entry->cisfile, socket_no);
> } else {
> printf("%s", entry->cisfile);
> }
> };
>
> if you have match and repair == 0 you have endless loop since entry
> pointer is never advanced.
> It should have return or break next to the printf.
> Is it right? Or it is too early in the morning...
Yes, it really seems to be broken. Patch to fix this is in pcmciautils-git;
it'll be part of pcmciautils-013.
Many thanks!
Dominik
More information about the linux-pcmcia
mailing list