Merge branch 'master' into experimental_varlen

* master:
  Fix segfault when loading a file
  Revert c7a4d7af, remove redundant include
This commit is contained in:
Philippe Teuwen
2019-04-24 00:59:57 +02:00
3 changed files with 2 additions and 4 deletions

View File

@@ -313,8 +313,8 @@ int loadFile(const char *preferredName, const char *suffix, void *data, size_t m
goto out;
}
if (bytes_read != maxdatalen) {
PrintAndLogDevice(WARNING, "Warning, bytes read exeed calling array limit. Max bytes is %d bytes", maxdatalen);
if (bytes_read > maxdatalen) {
PrintAndLogDevice(WARNING, "Warning, bytes read exceed calling array limit. Max bytes is %d bytes", maxdatalen);
bytes_read = maxdatalen;
}