DecoderAPI: use std::min()
This commit is contained in:
parent
cd6e0ff88a
commit
26bef5d209
@ -519,9 +519,7 @@ decoder_data(Decoder &decoder,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t nbytes = dest.size;
|
const size_t nbytes = std::min(dest.size, length);
|
||||||
if (nbytes > length)
|
|
||||||
nbytes = length;
|
|
||||||
|
|
||||||
/* copy the buffer */
|
/* copy the buffer */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user