cdown / rpms / util-linux

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