Merge branch '8.8'

This commit is contained in:
John Cupitt 2019-11-27 15:30:33 +00:00
commit b003b36d7a
2 changed files with 3 additions and 19 deletions

View File

@ -28,6 +28,7 @@
17/9/19 started 8.8.4 17/9/19 started 8.8.4
- improve compatibility with older imagemagick versions - improve compatibility with older imagemagick versions
- remove realpath, since it can fail on systems with grsec
31/8/19 started 8.8.3 31/8/19 started 8.8.3
- revert sharpen restoring the input colourspace - revert sharpen restoring the input colourspace

View File

@ -1897,25 +1897,10 @@ vips_realpath( const char *path )
{ {
char *real; char *real;
#ifdef HAVE_REALPATH /* It'd be nice to use realpath here, but sadly that won't work on
{ * linux systems with grsec, since it works by opening /proc/self/fd.
char buf[PATH_MAX];
/* More modern realpath() allow NULL for the second param, but we want
* to work with older libc as well.
*/ */
if( !(real = realpath( path, buf )) ) {
vips_error_system( errno, "vips_realpath",
"%s", _( "unable to form filename" ) );
return( NULL );
}
/* We must return a path that can be freed with g_free().
*/
real = g_strdup( real );
}
#else /*!HAVE_REALPATH*/
{
if( !g_path_is_absolute( path ) ) { if( !g_path_is_absolute( path ) ) {
char *cwd; char *cwd;
@ -1925,8 +1910,6 @@ vips_realpath( const char *path )
} }
else else
real = g_strdup( path ); real = g_strdup( path );
}
#endif
return( real ); return( real );
} }