mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-02 16:44:56 +01:00
too much read from kernel flash for checksum validation
This commit is contained in:
@@ -360,6 +360,10 @@ int verifyChecksumFromFlash(char *mess, char *functionType,
|
||||
("\tReached %lu bytes. Not reading more\n", totalBytesRead));
|
||||
break;
|
||||
}
|
||||
// for less than 128 bytes
|
||||
if ((readUnitSize + totalBytesRead) > fsize) {
|
||||
readUnitSize = fsize - totalBytesRead;
|
||||
}
|
||||
bytes = fread(buf, 1, readUnitSize, fp);
|
||||
totalBytesRead += bytes;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user