bug fixed on grub_strncat()
grub_strncat() eats the last char copid from 'dest', this patch should fix it.
kern/misc.c 2008-03-20 10:39:36.000000000 +0800 renamed from kern/misc.c 2008-02-03 21:11:31.000000000 +0800 +2 -1
@@ -110,7 +110,8 @@ while ((*p++ = *src++) != '\0' && --c) ; - *(--p) = '\0'; + if (!c) + *(p) = '\0';
PS: no body cares about previous patch I sent??
I put it below, it is easy to understand when you read it.
kern/env.c +1 -1
@@ -124,7 +124,7 @@ {struct grub_env_var *p, *q; -for (p = current_context->prev->vars[i]; p; p = q) +for (p = current_context->vars[i]; p; p = q) { q = p->next;grub_free (p);
Zhang Huan
Tel: (86)10-6260-0549
Mailing: P. O. Box 2704# Beijing
Postcode: 100080
National Research Centre for High Performance Computers Institute of Computing Technology, Chinese Academy of Sciences No. 6, South Kexueyuan Road, Haidian District Beijing, China
Both fixed, thank you!
Quoted 49 lines · zhanghuan
grub_strncat()eats the last char copid from 'dest', this patch should fix it.diff -ur
grub-1.96/kern/misc.cgrub-1.96fix/kern/misc.ckern/misc.c 2008-03-20 10:39:36.000000000 +0800 renamed from kern/misc.c 2008-02-03 21:11:31.000000000 +0800 +2
-1@@ -110,7 +110,8 @@ while ((*p++ = *src++) != '\0' && --c) ; - *(--p) = '\0'; + if (!c) + *(p) = '\0';PS: no body cares about previous patch I sent??
I put it below, it is easy to understand when you read it.diff -ur
grub-1.96/kern/env.cgrub-1.96fix/kern/env.ckern/env.c +1
-1@@ -124,7 +124,7 @@ {struct grub_env_var *p, *q; -for (p = current_context->prev->vars[i]; p; p = q) +for (p = current_context->vars[i]; p; p = q) { q = p->next;grub_free (p);Zhang Huan
Tel: (86)10-6260-0549
Mailing: P. O. Box 2704# Beijing
Postcode: 100080
National Research Centre for High Performance Computers Institute of Computing Technology, Chinese Academy of Sciences No. 6, South Kexueyuan Road, Haidian District Beijing, China_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 5 lines
Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What use is a phone call… if you are unable to speak? (as seen on /.)