At Wed, 2 Sep 2009 02:49:39 +0100,
Colin Watson wrote:
> +#ifndef HAVE_VASPRINTF
> +
> +int
> +vasprintf (char **buf, const char *fmt, va_list ap)
> +{
> +  /* Should be large enough.  */
> +  *buf = xmalloc (512);
> +
> +  return vsprintf (*buf, fmt, ap);
> +}
> +
> +#endif

Perhaps check that the number of characters is not more than 512 (if
so, panic).

Neal


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to