|
From: Wang, S. <sha...@in...> - 2008-11-18 06:17:30
|
Yes, it is really a bug. Thanks. Shane ________________________________ From: Ross Philipson [mailto:Ros...@ci...] Sent: 2008年11月17日 6:43 To: tbo...@li... Subject: [tboot-devel] ARRAY_SIZE bug in tboot I think I found a bug in the command line handling code in tboot. It is in the calls to cmdline_option_read() in lib.c. This function uses the ARRAY_SIZE macro within the loop but in this case it is being used with the cmdline_option_t *cmdline_option argument which is a pointer. The ARRAY_SIZE macro evaluates sizeof() on the pointer which is 4 in this case and the loop never runs. I wanted a sanity check on this but I think it is a problem. I checked the other places that ARRAY_SIZE is used and they seem OK. I discovered this while working on changes to tboot logging. I can fix it in the patch I hope to send out early next week if that works. Thanks Ross Ross Philipson Senior Software Engineer Citrix Systems, Inc 14 Crosby Drive Bedford, MA 01730 781-301-7949 ros...@ci...<mailto:ros...@ci...> |