On Fri, Dec 06, 2002 at 04:12:16PM +0100, Lubos Lunak wrote: > but %s in scanf() without a size limit is simply baaaaad. > yeah, the kernel could be attempting to crack your box. :)))) > f = fopen("/proc/apm", "r"); > + s = fscanf(f, "%255s %d.%d %x %x %x %x %d%% %d %s\n", seriously, if you can prove that it's poinless to add additional safety, then don't bother to make the code less readable. maybe add a comment. greetings -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done.