Browse Source

mount: fix gcc7 format-overflow errors

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Hans Dedecker 5 years ago
parent
commit
4177583263
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mount.c

+ 1 - 1
mount.c

@@ -394,7 +394,7 @@ static char* mount_get_serial(char *dev)
 				{
 					int id;
 					struct stat buf;
-					char tmp3[255];
+					char tmp3[strlen(namelist[n]->d_name) + strlen(dev) + 31];
 					int ret;
 					*t = 0;
 					id = atoi(namelist[n]->d_name);