mount: Reduce size of mkey in ext_mount_lookup

Submitted by Radostin Stoyanov on Aug. 27, 2018, 2:22 p.m.

Details

Message ID 20180827142239.19529-1-rstoyanov1@gmail.com
State Accepted
Series "mount: Reduce size of mkey in ext_mount_lookup"
Headers show

Commit Message

Radostin Stoyanov Aug. 27, 2018, 2:22 p.m.
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 criu/mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/mount.c b/criu/mount.c
index 62e012ec..2df6134b 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -98,7 +98,7 @@  static char *ext_mount_lookup(char *key)
 {
 	char *v;
 	int len = strlen(key);
-	char mkey[len + 8];
+	char mkey[len + 6];
 
 	sprintf(mkey, "mnt[%s]", key);
 	v = external_lookup_by_key(mkey);

Comments

Andrey Vagin Aug. 29, 2018, 12:07 p.m.
Applied, thanks!

On Mon, Aug 27, 2018 at 03:22:39PM +0100, Radostin Stoyanov wrote:
> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
> ---
>  criu/mount.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/mount.c b/criu/mount.c
> index 62e012ec..2df6134b 100644
> --- a/criu/mount.c
> +++ b/criu/mount.c
> @@ -98,7 +98,7 @@ static char *ext_mount_lookup(char *key)
>  {
>  	char *v;
>  	int len = strlen(key);
> -	char mkey[len + 8];
> +	char mkey[len + 6];
>  
>  	sprintf(mkey, "mnt[%s]", key);
>  	v = external_lookup_by_key(mkey);
> -- 
> 2.17.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu