gkrellm: fix crashes while gathering disk and battery info
1 files added
2 files modified
| | |
| | | |
| | | COMPONENT_NAME= gkrellm |
| | | COMPONENT_VERSION= 2.3.10 |
| | | COMPONENT_REVISION= 1 |
| | | COMPONENT_REVISION= 2 |
| | | COMPONENT_PROJECT_URL= http://gkrellm.srcbox.net/ |
| | | COMPONENT_SUMMARY= Popular (ubiquitous) Gtk-based system monitor |
| | | COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
| | |
| | | + return ; |
| | | + } |
| | | + |
| | | + key = "battery.rechargeable.is_discharging"; /* the battery is being used */ |
| | | + key = g_strdup("battery.rechargeable.is_discharging"); /* the battery is being used */ |
| | | + discharging = libhal_device_get_property_bool( ctx, udi, key, &error ); |
| | | + g_free(key); |
| | | + |
New file |
| | |
| | | Fixes crash in gkrellm_disk_assign_data_by_name() |
| | | --- gkrellm-2.3.10/src/sysdeps/solaris.c.~2~ 2020-07-20 23:14:32.537403716 +0000 |
| | | +++ gkrellm-2.3.10/src/sysdeps/solaris.c 2020-07-20 23:16:09.486411565 +0000 |
| | | @@ -262,7 +262,7 @@ |
| | | static gint get_instance(gint); |
| | | |
| | | typedef struct { |
| | | - char name[8]; |
| | | + char name[KSTAT_STRLEN]; |
| | | } probed_harddisk; |
| | | |
| | | GList *hard_disk_list; |
| | | @@ -301,6 +301,8 @@ |
| | | |
| | | if(strcmp(drive->name, ksp->ks_name)) |
| | | continue; |
| | | + if(!isharddisk(ksp)) |
| | | + continue; |
| | | |
| | | memset((void *)&kios, 0, sizeof(kstat_io_t)); |
| | | kstat_read(kc, ksp, &kios); |