From 8891d6dc29b345d293780774a244486122b02978 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 28 Aug 2018 11:08:49 +0100 Subject: [PATCH] exif strings were not trimmed correctly drop_tail() missed the final "()" --- libvips/foreign/exif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvips/foreign/exif.c b/libvips/foreign/exif.c index c4b82f8c..c3b1ed50 100644 --- a/libvips/foreign/exif.c +++ b/libvips/foreign/exif.c @@ -811,8 +811,8 @@ drop_tail( const char *data ) p = str + strlen( str ); if( p > str && - *(p = g_utf8_prev_char( p )) == ')' && - (p = g_utf8_strrchr( p, -1, (gunichar) '(')) && + *g_utf8_prev_char( p ) == ')' && + (p = g_utf8_strrchr( str, -1, (gunichar) '(')) && p > str && *(p = g_utf8_prev_char( p )) == ' ' ) *p = '\0';