Fixed buffer overflow when the netloader chunksize is too large, during NRO transfer (this will not occur with an unmodified nxlink).
This commit is contained in:
parent
ce35f40f31
commit
6c84575ef7
@ -304,6 +304,12 @@ static int decompress(int sock, FILE *fh, size_t filesize) {
|
||||
return Z_DATA_ERROR;
|
||||
}
|
||||
|
||||
if (chunksize > sizeof(in)) {
|
||||
(void)inflateEnd(&strm);
|
||||
netloader_error("Invalid chunk size.",0);
|
||||
return Z_DATA_ERROR;
|
||||
}
|
||||
|
||||
strm.avail_in = recvall(sock,in,chunksize,0);
|
||||
|
||||
if (strm.avail_in == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user