]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix memory leak and out-of-range writes
authorBVK Chaitanya <bvk@dbook>
Sat, 4 Sep 2010 08:52:51 +0000 (14:22 +0530)
committerBVK Chaitanya <bvk@dbook>
Sat, 4 Sep 2010 08:52:51 +0000 (14:22 +0530)
grub-core/commands/wildcard.c

index bba99dcc8ca815343aaf29b7d7758cbf6db8d7d3..cbe32e0ff11e2d392bbb76559bad7569f1220d17 100644 (file)
@@ -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;