Re: [PATCH] login-utils: Removed upper limit on passwd line size in is_local, added tests.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 08, 2008 at 01:09:23AM +0200, Karel Zak wrote:
> +        while(fgets(line, len + 2, fd)) {
> +		int c = line[len];
> +                if(!strncmp(line, user, len) && c == ':') {
>  			local = 1;
>  			break;
>                  }
> +		while(c != '\n' && (c = fgetc(fd)) != EOF);

 sorry..

 if (line[strlen(line) - 1] != '\n')
    while((c = fgetc(fd)) != EOF && c != '\n');


    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux