[core] fix potential invalid label for non western locales

* If a converted label contains mostly underscore, the proposed
  label is used for FAT32 instead. However this label still has
  the KB/MB/GB symbols localized so it may be invalid.
* Ensure that we use a non-localized version of the size when
  using such a label.
* Closes #1506.
* Also fix a VS2019 static analysis warning in net.c.
This commit is contained in:
Pete Batard 2020-04-10 17:59:12 +01:00
parent 2442aaf76f
commit 3c75ca92b4
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 15 additions and 9 deletions

View file

@ -240,6 +240,7 @@ static char* GetShortName(const char* url)
break;
}
}
memset(short_name, 0, sizeof(short_name));
static_strcpy(short_name, &url[i]);
// If the URL is followed by a query, remove that part
// Make sure we detect escaped queries too