Yes, it is really a bug.

From: Ross Philipson []
Sent: 20081117 6:43
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.





Ross Philipson

Senior Software Engineer

Citrix Systems, Inc

14 Crosby Drive

Bedford, MA 01730