Logoj0ke.net Open Build Service > Projects > server:monitoring > collectd > collectd-fix-snprintf-overflow.patch
Sign Up | Log In

File collectd-fix-snprintf-overflow.patch of Package collectd (Revision 5)

Currently displaying revision 5, show latest

x
 
1
--- src/sensors.c.orig  2007-06-04 23:15:02.000000000 +0200
2
+++ src/sensors.c   2007-06-04 23:16:21.000000000 +0200
3
@@ -394,7 +394,7 @@
4
        }
5
        else if (feature->chip->bus == SENSORS_CHIP_NAME_BUS_DUMMY)
6
        {
7
-           if (snprintf (plugin_instance, 512, "%s-%s-%04x",
8
+           if (snprintf (plugin_instance, DATA_MAX_NAME_LEN, "%s-%s-%04x",
9
                        feature->chip->prefix,
10
                        feature->chip->busname,
11
                        feature->chip->addr)
12
@@ -403,7 +403,7 @@
13
        }
14
        else
15
        {
16
-           if (snprintf (plugin_instance, 512, "%s-i2c-%d-%02x",
17
+           if (snprintf (plugin_instance, DATA_MAX_NAME_LEN, "%s-i2c-%d-%02x",
18
                        feature->chip->prefix,
19
                        feature->chip->bus,
20
                        feature->chip->addr)
21