lavu/imgutils: add consistency checks to av_image_copy_plane()
Add assertions and abort in case of invalid |dst_linesize| < bytewidth or |src_linesize| < bytewidth. Avoid to silently corrupt memory.
This commit is contained in:
@@ -99,6 +99,9 @@ int av_image_alloc(uint8_t *pointers[4], int linesizes[4],
|
||||
* The first byte of each successive line is separated by *_linesize
|
||||
* bytes.
|
||||
*
|
||||
* bytewidth must be contained by both absolute values of dst_linesize
|
||||
* and src_linesize, otherwise the function behavior is undefined.
|
||||
*
|
||||
* @param dst_linesize linesize for the image plane in dst
|
||||
* @param src_linesize linesize for the image plane in src
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user