Re: [tboot-devel] Bug in find_mle_hdr(), mlehash.c

2009-07-21 Thread Shane Wang
Hi Michael, Thank you for pointing out the potential issue. Here is the fix for it. Fix the potential segmentation fault in find_mle_hdr, when size%sizeof(uuid_t)!=0 where size is unsigned long. Signed-off-by: Shane Wang diff -r ad96c7e8bf5a lcptools/mlehash.c --- a/lcptools/mlehash.cTu

[tboot-devel] Bug in find_mle_hdr(), mlehash.c

2009-07-21 Thread Michael Gissing
Hi! This is just a minor issue, but I want to share it with you ;-) file mlehash.c, line 311: size is a size_t (typedefed unsigned long), so if "size%sizeof(uuid_t) != 0", size will _always_ be >0, the loop won't exit and you'll get a segfault. I've got a question too: How do you ensure that t