On Tue, 16 Dec 2008, Arnaud Lacombe wrote:
you didn't use 2nd patch from paul, so "AMD Power Management features" is still missing. please apply attached patch, and please pullup to netbsd-5.I object. Dynamic allocation should not be needed, CPUID_APM_FLAGS is way much smaller than MAXPATHLEN and there is no reason to use MAXPATHLEN just because it is a huge value, the use of this constant is bogus in this context.
Well, then it must be bogus in all the other places it is used in cpuctl's arch/i386.c !! As noted when I submitted the patch, the buffersize was selected because "... size MAXPATHLEN (similar to the other buffers being passed to bitmask_snprintF()"
It would certainly be possible to replace ALL of the allocated buffers with one of size 80 (with an appropriate #define), which would be large enough for any of the snprintf() result strings.
---------------------------------------------------------------------- | Paul Goyette | PGP DSS Key fingerprint: | E-mail addresses: | | Customer Service | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost | | Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette%juniper.net@localhost | | | | pgoyette%netbsd.org@localhost | ----------------------------------------------------------------------