dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
6717ab
diff -up util-linux-2.23.2/libmount/src/context_umount.c.kzak util-linux-2.23.2/libmount/src/context_umount.c
6717ab
--- util-linux-2.23.2/libmount/src/context_umount.c.kzak	2013-10-07 11:43:10.990598629 +0200
6717ab
+++ util-linux-2.23.2/libmount/src/context_umount.c	2013-10-07 11:46:01.051031431 +0200
6717ab
@@ -423,6 +423,8 @@ static int evaluate_permissions(struct l
6717ab
 		if (optstr && !mnt_optstr_get_option(optstr,
6717ab
 					"user", &mtab_user, &sz) && sz)
6717ab
 			ok = !strncmp(curr_user, mtab_user, sz);
6717ab
+
6717ab
+		free(curr_user);
6717ab
 	}
6717ab
 
6717ab
 	if (ok) {
6717ab
diff -up util-linux-2.23.2/libmount/src/utils.c.kzak util-linux-2.23.2/libmount/src/utils.c
6717ab
--- util-linux-2.23.2/libmount/src/utils.c.kzak	2013-07-30 11:15:27.391515623 +0200
6717ab
+++ util-linux-2.23.2/libmount/src/utils.c	2013-10-07 11:43:27.209924834 +0200
6717ab
@@ -159,7 +159,7 @@ int mnt_chdir_to_parent(const char *targ
6717ab
 		if (!last || !*last)
6717ab
 			memcpy(*filename, ".", 2);
6717ab
 		else
6717ab
-			memcpy(*filename, last, strlen(last) + 1);
6717ab
+			memmove(*filename, last, strlen(last) + 1);
6717ab
 	} else
6717ab
 		free(buf);
6717ab
 	return 0;