~ubuntu-branches/ubuntu/trusty/thermald/trusty

« back to all changes in this revision

Viewing changes to debian/patches/0001-Buggy-thermal-zone-trip-index.patch

  • Committer: Package Import Robot
  • Author(s): Colin King
  • Date: 2014-01-10 11:34:53 UTC
  • Revision ID: package-import@ubuntu.com-20140110113453-n6q6ysjutryiox22
Tags: 1.1~rc2-3
* Correctly rename man pages, fixes FTBFS (Closes: #734786)
* Apply buggy thermal zone trip index fix (Closes: #734832)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/src/thd_zone_therm_sys_fs.cpp
 
2
+++ b/src/thd_zone_therm_sys_fs.cpp
 
3
@@ -150,10 +150,12 @@
 
4
                                if (ptr) {
 
5
                                        ptr += strlen("cooling_device");
 
6
                                        thd_log_debug("symbolic name %s:%s\n", buf, ptr);
 
7
-                                       if (trip_cnt >= 0) {
 
8
+                                       if (trip_cnt >= 0 && trip_cnt < trip_point_cnt) {
 
9
                                                trip_points[trip_cnt].thd_trip_point_add_cdev_index(
 
10
                                                                atoi(ptr), cthd_trip_point::default_influence);
 
11
                                                zone_cdev_binded_status = true;
 
12
+                                       } else {
 
13
+                                               thd_log_debug("Invalid trip_cnt\n");
 
14
                                        }
 
15
                                }
 
16
                        }