* 0002-C-library-Bug-fix-for-incorrect-use-of-sizeof.patch * 0003-Simc-plugin-Fix-gcc-warning-on-fallthrough-switch.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/libstoragemgmt?expand=0&rev=35
17 lines
846 B
Diff
17 lines
846 B
Diff
Index: c_binding/libses.c
|
|
===================================================================
|
|
--- c_binding/libses.c.orig
|
|
+++ c_binding/libses.c
|
|
@@ -341,9 +341,9 @@ static int _ses_sg_paths_get(char *err_m
|
|
(strncmp(sg_name, "sg", strlen("sg")) != 0))
|
|
continue;
|
|
sysfs_sg_type_path = (char *)
|
|
- malloc(sizeof(char) * (sizeof(_SYSFS_SG_ROOT_PATH) +
|
|
+ malloc(sizeof(char) * (strlen(_SYSFS_SG_ROOT_PATH) +
|
|
strlen("/") +
|
|
- sizeof(sg_name) +
|
|
+ strlen(sg_name) +
|
|
strlen("/device/type") +
|
|
1 /* trailing \0 */));
|
|
_alloc_null_check(err_msg, sysfs_sg_type_path, rc, out);
|