[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 21/26: Fix insecure format
From: |
Samuel Thibault |
Subject: |
[hurd] 21/26: Fix insecure format |
Date: |
Tue, 22 Sep 2015 21:51:49 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch dde
in repository hurd.
commit 63dc5656c46f3ff1223e25325e92358822a65b76
Author: Samuel Thibault <address@hidden>
Date: Mon Aug 31 00:59:12 2015 +0200
Fix insecure format
* contrib/drivers/base/attribute_container.c
(attribute_container_add_device): Use %s format instead of a given char*.
* contrib/drivers/base/platform.c (platform_device_add): Likewise.
* contrib/drivers/base/sys.c (sysdev_class_register): Likewise.
* contrib/lib/kobject.c (kset_create): Likewise.
* contrib/net/core/net-sysfs.c (netdev_register_kobject): Likewise.
* lib/src/drivers/base/core.c (__root_device_register): Likewise.
---
libdde_linux26/contrib/drivers/base/attribute_container.c | 2 +-
libdde_linux26/contrib/drivers/base/platform.c | 2 +-
libdde_linux26/contrib/drivers/base/sys.c | 2 +-
libdde_linux26/contrib/lib/kobject.c | 2 +-
libdde_linux26/contrib/net/core/net-sysfs.c | 2 +-
libdde_linux26/lib/src/drivers/base/core.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/libdde_linux26/contrib/drivers/base/attribute_container.c
b/libdde_linux26/contrib/drivers/base/attribute_container.c
index b9cda05..e0f7859 100644
--- a/libdde_linux26/contrib/drivers/base/attribute_container.c
+++ b/libdde_linux26/contrib/drivers/base/attribute_container.c
@@ -167,7 +167,7 @@ attribute_container_add_device(struct device *dev,
ic->classdev.parent = get_device(dev);
ic->classdev.class = cont->class;
cont->class->dev_release = attribute_container_release;
- dev_set_name(&ic->classdev, dev_name(dev));
+ dev_set_name(&ic->classdev, "%s", dev_name(dev));
if (fn)
fn(cont, dev, &ic->classdev);
else
diff --git a/libdde_linux26/contrib/drivers/base/platform.c
b/libdde_linux26/contrib/drivers/base/platform.c
index 349a101..030d638 100644
--- a/libdde_linux26/contrib/drivers/base/platform.c
+++ b/libdde_linux26/contrib/drivers/base/platform.c
@@ -244,7 +244,7 @@ int platform_device_add(struct platform_device *pdev)
if (pdev->id != -1)
dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
else
- dev_set_name(&pdev->dev, pdev->name);
+ dev_set_name(&pdev->dev, "%s", pdev->name);
for (i = 0; i < pdev->num_resources; i++) {
struct resource *p, *r = &pdev->resource[i];
diff --git a/libdde_linux26/contrib/drivers/base/sys.c
b/libdde_linux26/contrib/drivers/base/sys.c
index b428c8c..38e725c 100644
--- a/libdde_linux26/contrib/drivers/base/sys.c
+++ b/libdde_linux26/contrib/drivers/base/sys.c
@@ -137,7 +137,7 @@ int sysdev_class_register(struct sysdev_class * cls)
cls->kset.kobj.parent = &system_kset->kobj;
cls->kset.kobj.ktype = &ktype_sysdev_class;
cls->kset.kobj.kset = system_kset;
- kobject_set_name(&cls->kset.kobj, cls->name);
+ kobject_set_name(&cls->kset.kobj, "%s", cls->name);
return kset_register(&cls->kset);
}
diff --git a/libdde_linux26/contrib/lib/kobject.c
b/libdde_linux26/contrib/lib/kobject.c
index 0487d1f..a1682ef 100644
--- a/libdde_linux26/contrib/lib/kobject.c
+++ b/libdde_linux26/contrib/lib/kobject.c
@@ -794,7 +794,7 @@ static struct kset *kset_create(const char *name,
kset = kzalloc(sizeof(*kset), GFP_KERNEL);
if (!kset)
return NULL;
- kobject_set_name(&kset->kobj, name);
+ kobject_set_name(&kset->kobj, "%s", name);
kset->uevent_ops = uevent_ops;
kset->kobj.parent = parent_kobj;
diff --git a/libdde_linux26/contrib/net/core/net-sysfs.c
b/libdde_linux26/contrib/net/core/net-sysfs.c
index 484f587..2da59a0 100644
--- a/libdde_linux26/contrib/net/core/net-sysfs.c
+++ b/libdde_linux26/contrib/net/core/net-sysfs.c
@@ -498,7 +498,7 @@ int netdev_register_kobject(struct net_device *net)
dev->groups = groups;
BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
- dev_set_name(dev, net->name);
+ dev_set_name(dev, "%s", net->name);
#ifdef CONFIG_SYSFS
*groups++ = &netstat_group;
diff --git a/libdde_linux26/lib/src/drivers/base/core.c
b/libdde_linux26/lib/src/drivers/base/core.c
index e380071..c6363dd 100644
--- a/libdde_linux26/lib/src/drivers/base/core.c
+++ b/libdde_linux26/lib/src/drivers/base/core.c
@@ -1253,7 +1253,7 @@ struct device *__root_device_register(const char *name,
struct module *owner)
if (!root)
return ERR_PTR(err);
- err = dev_set_name(&root->dev, name);
+ err = dev_set_name(&root->dev, "%s", name);
if (err) {
kfree(root);
return ERR_PTR(err);
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 24/26: Merge remote-tracking branch 'incubator/dde' into dde-upstream, (continued)
- [hurd] 24/26: Merge remote-tracking branch 'incubator/dde' into dde-upstream, Samuel Thibault, 2015/09/22
- [hurd] 08/26: commit 042a53a9e437feaf2230dd2cadcecfae9c7bfe05, Samuel Thibault, 2015/09/22
- [hurd] 22/26: Install missing queue.h, Samuel Thibault, 2015/09/22
- [hurd] 12/26: update pci_ids, Samuel Thibault, 2015/09/22
- [hurd] 17/26: Add pr_cont, Samuel Thibault, 2015/09/22
- [hurd] 26/26: Move files, Samuel Thibault, 2015/09/22
- [hurd] 14/26: update workqueue.h, Samuel Thibault, 2015/09/22
- [hurd] 25/26: Merge branch 'dde-upstream' into dde, Samuel Thibault, 2015/09/22
- [hurd] 23/26: Fix build with gcc 5, Samuel Thibault, 2015/09/22
- [hurd] 15/26: commit 9d21493b4beb8f918ba248032fefa393074a5e2b, Samuel Thibault, 2015/09/22
- [hurd] 21/26: Fix insecure format,
Samuel Thibault <=
- [hurd] 03/26: commit f001fde5eadd915f4858d22ed70d7040f48767cf, Samuel Thibault, 2015/09/22
- [hurd] 06/26: commit 31278e71471399beaff9280737e52b47db4dc345, Samuel Thibault, 2015/09/22
- [hurd] 04/26: commit ccffad25b5136958d4769ed6de5e87992dd9c65c, Samuel Thibault, 2015/09/22
- [hurd] 09/26: Add mdio.h, Samuel Thibault, 2015/09/22
- [hurd] 19/26: Add rcuclassic.c, Samuel Thibault, 2015/09/22
- [hurd] 20/26: really add files, Samuel Thibault, 2015/09/22