Message ID | 1330679404-8789-4-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Fri, Mar 2, 2012 at 5:10 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpi/wmi/wmi.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c > index 8190e17..de353c6 100644 > --- a/src/acpi/wmi/wmi.c > +++ b/src/acpi/wmi/wmi.c > @@ -348,7 +348,7 @@ static int wmi_SSDT(fwts_framework *fw) > > for (i=0; i < 16; i++) { > char buffer[10]; > - sprintf(buffer,"SSDT%d", i+1); > + snprintf(buffer, sizeof(buffer), "SSDT%d", i+1); > > ret = wmi_table(fw, "SSDT", i, buffer, &result); > if (ret == FWTS_NO_TABLE) { > -- > 1.7.9 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 03/02/2012 05:10 PM, Colin King wrote: > From: Colin Ian King<colin.king@canonical.com> > > Signed-off-by: Colin Ian King<colin.king@canonical.com> > --- > src/acpi/wmi/wmi.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c > index 8190e17..de353c6 100644 > --- a/src/acpi/wmi/wmi.c > +++ b/src/acpi/wmi/wmi.c > @@ -348,7 +348,7 @@ static int wmi_SSDT(fwts_framework *fw) > > for (i=0; i< 16; i++) { > char buffer[10]; > - sprintf(buffer,"SSDT%d", i+1); > + snprintf(buffer, sizeof(buffer), "SSDT%d", i+1); > > ret = wmi_table(fw, "SSDT", i, buffer,&result); > if (ret == FWTS_NO_TABLE) { Acked-by: Alex Hung <alex.hung@canonical.com>
diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c index 8190e17..de353c6 100644 --- a/src/acpi/wmi/wmi.c +++ b/src/acpi/wmi/wmi.c @@ -348,7 +348,7 @@ static int wmi_SSDT(fwts_framework *fw) for (i=0; i < 16; i++) { char buffer[10]; - sprintf(buffer,"SSDT%d", i+1); + snprintf(buffer, sizeof(buffer), "SSDT%d", i+1); ret = wmi_table(fw, "SSDT", i, buffer, &result); if (ret == FWTS_NO_TABLE) {