usbreset: fix possible access to uninitialized variable (#15041)
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 23 Feb 2014 23:42:12 +0000 (23:42 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 23 Feb 2014 23:42:12 +0000 (23:42 +0000)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 39738

package/utils/usbreset/Makefile
package/utils/usbreset/src/usbreset.c

index 55ce21ef5290b0e8d8f5832d3de0969f23552e32..d8efa54c15e2c3391cbcbbd7c83c0152c48d1956 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2011-2013 OpenWrt.org
+# Copyright (C) 2011-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=usbreset
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 include $(INCLUDE_DIR)/package.mk
 
index f6f2ba288ae4926ae59eeb03d9a727889f72b02e..ead30b1d822bbf8f934c52302f6cb7981d8b349f 100644 (file)
@@ -65,7 +65,7 @@ struct usbentry {
 
 static char *sysfs_attr(const char *dev, const char *attr)
 {
-       int fd, len;
+       int fd, len = 0;
        char path[PATH_MAX];
        static char buf[129];