~ubuntu-branches/ubuntu/vivid/xfce4-netload-plugin/vivid

« back to all changes in this revision

Viewing changes to debian/patches/01_fix-snprintf-format.patch

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Lionel Le Folgoc, Yves-Alexis Perez
  • Date: 2011-04-19 23:12:43 UTC
  • mfrom: (1.1.4 upstream) (9.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20110419231243-tkce1b7gx8kjiu7h
Tags: 1.0.0-2
[ Lionel Le Folgoc ]
* Upload to unstable.
* debian/control:
  - add myself to Uploaders.
  - remove Simon and Emanuele from uploaders, thanks to them.

[ Yves-Alexis Perez ]
* debian/control:
  - update standards version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff --git a/panel-plugin/net.c b/panel-plugin/net.c
 
2
index 261e466..e5afd5c 100644
 
3
--- a/panel-plugin/net.c
 
4
+++ b/panel-plugin/net.c
 
5
@@ -194,7 +194,7 @@ int get_interface_up(netdata* data)
 
6
         return FALSE;
 
7
     }
 
8
     
 
9
-    snprintf(ifr.ifr_name, IF_NAMESIZE, data->ifdata.if_name);
 
10
+    snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", data->ifdata.if_name);
 
11
     if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) != 0)
 
12
     {
 
13
         PRINT_DBG("Error in ioctl(sockfd): %s", strerror(errno));
 
14
@@ -231,7 +231,7 @@ char* get_ip_address(netdata* data)
 
15
         return NULL;
 
16
     }
 
17
     
 
18
-    snprintf(ifr.ifr_name, IF_NAMESIZE, data->ifdata.if_name);
 
19
+    snprintf(ifr.ifr_name, IF_NAMESIZE, "%s", data->ifdata.if_name);
 
20
     if (ioctl(sockfd, SIOCGIFADDR, &ifr) != 0)
 
21
     {
 
22
            if (errno != EADDRNOTAVAIL)