[Patch] Patches for bug 12965

From: Chen Liu
Date: Wed Mar 02 2011 - 14:31:08 EST


Hi everyone,

There are two patches generated by the tool R2Fix for bug 12965. Could
you take a look at them? Thanks!
The first patch:
--- linux-2.6.29/arch/s390/kernel/early.c 2010-12-05 18:52:18.076799211 -0500
+++ /tmp/cocci-output-646-d83504-early.c 2011-02-23 21:55:55.654039114 -0500
@@ -108,8 +108,8 @@ static noinline __init void create_kerne
sinitrd_pfn = PFN_DOWN(__pa(INITRD_START));
einitrd_pfn = PFN_UP(__pa(INITRD_START + INITRD_SIZE));
min_size = einitrd_pfn << 2;
- sprintf(defsys_cmd, "%s EW %.5X-%.5X", defsys_cmd,
- sinitrd_pfn, einitrd_pfn);
+ snprintf(defsys_cmd, sizeof(defsys_cmd), "%s EW %.5X-%.5X",
+ defsys_cmd, sinitrd_pfn, einitrd_pfn);
}
#endif



The second patch:
--- linux-2.6.29/arch/s390/kernel/early.c 2010-12-05 18:52:18.076799211 -0500
+++ /tmp/cocci-output-656-9b7221-early.c 2011-02-23 21:55:55.957164291 -0500
@@ -113,8 +113,8 @@ static noinline __init void create_kerne
}
#endif

- sprintf(defsys_cmd, "%s EW MINSIZE=%.7iK PARMREGS=0-13",
- defsys_cmd, min_size);
+ snprintf(defsys_cmd, sizeof(defsys_cmd),
+ "%s EW MINSIZE=%.7iK PARMREGS=0-13", defsys_cmd, min_size);
sprintf(savesys_cmd, "SAVESYS %s \n IPL %s",
kernel_nss_name, kernel_nss_name);



Best,
Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/