From: BVK Chaitanya Date: Sat, 4 Sep 2010 08:52:51 +0000 (+0530) Subject: fix memory leak and out-of-range writes X-Git-Tag: 1.99~593^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=854bd47cb875c9b0127cf23c5a95163e4f991cbf;p=thirdparty%2Fgrub.git fix memory leak and out-of-range writes --- diff --git a/grub-core/commands/wildcard.c b/grub-core/commands/wildcard.c index bba99dcc8..cbe32e0ff 100644 --- a/grub-core/commands/wildcard.c +++ b/grub-core/commands/wildcard.c @@ -72,6 +72,7 @@ merge (char **dest, char **ps) return 0; } + dest = p; for (j = 0; ps[j]; j++) dest[i++] = ps[j]; dest[i] = 0;