fix null string in buffer print
Some libvips header fields can be NULL, for example filename, and we need to avoid null pointer deref on print. See https://github.com/libvips/libvips/issues/3043
This commit is contained in:
parent
0e7c7a9a13
commit
0b3ab3a934
@ -262,6 +262,8 @@ vips_buf_appendns( VipsBuf *buf, const char *str, int sz )
|
|||||||
|
|
||||||
if( buf->full )
|
if( buf->full )
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
|
if( !str )
|
||||||
|
return( TRUE );
|
||||||
|
|
||||||
/* Amount we want to copy.
|
/* Amount we want to copy.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user