On Fri, Jul 10, 2009 at 10:28:03PM +0800, Bean wrote: > Hi, > > There is something wrong with r2132, now childtype is a pointer, so > sizeof childtype == 4, the name would be truncated to 4 characters.
Bean, you never cease to amaze me. I admit the "interesting, exactly the word size" idea crossed my head, but I didn't reach any conclussion out of it :-) Nice catch. Will you commit this, or want me to? > diff --git a/kern/ieee1275/openfw.c b/kern/ieee1275/openfw.c > index e7979f4..42d9278 100644 > --- a/kern/ieee1275/openfw.c > +++ b/kern/ieee1275/openfw.c > @@ -78,15 +78,15 @@ grub_children_iterate (char *devpath, > grub_ssize_t actual; > > if (grub_ieee1275_get_property (child, "device_type", childtype, > - sizeof childtype, &actual)) > + IEEE1275_MAX_PROP_LEN, &actual)) > continue; > > - if (grub_ieee1275_package_to_path (child, childpath, sizeof childpath, > - &actual)) > + if (grub_ieee1275_package_to_path (child, childpath, > + IEEE1275_MAX_PATH_LEN, &actual)) > continue; > > if (grub_ieee1275_get_property (child, "name", childname, > - sizeof childname, &actual)) > + IEEE1275_MAX_PATH_LEN, &actual)) > continue; > > grub_sprintf (fullname, "%s/%s", devpath, childname); -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel