From eafae042457d302c97f96ecbd8b31a0e6842f535 Mon Sep 17 00:00:00 2001 From: William Skaggs Date: Fri, 4 Feb 2005 17:44:54 +0000 Subject: [PATCH] Bill Skaggs * plug-ins/jpeg/jpeg-exif.c: check validity of orientation value before using, see bug #166248. --- ChangeLog | 5 +++++ plug-ins/jpeg/jpeg-exif.c | 5 ++--- po/Makefile.in.in | 32 +++++++++++++++----------------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90ffee0298..e6f96c79a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-04 Bill Skaggs + + * plug-ins/jpeg/jpeg-exif.c: check validity of orientation + value before using, see bug #166248. + 2005-02-03 Sven Neumann * app/file/file-utils.[ch]: added new utility function diff --git a/plug-ins/jpeg/jpeg-exif.c b/plug-ins/jpeg/jpeg-exif.c index 9d2bdb8776..92728b35a3 100644 --- a/plug-ins/jpeg/jpeg-exif.c +++ b/plug-ins/jpeg/jpeg-exif.c @@ -84,14 +84,13 @@ jpeg_apply_exif_data_to_image (const gchar *filename, { gint orient = exif_get_short (entry->data, byte_order); - if (load_interactive && orient != 1) + if (load_interactive && orient > 1 && orient <= 8) if (jpeg_query (_("According to the EXIF data, this image is rotated. " "Would you like GIMP to rotate it into the standard " "orientation?"))) { switch (orient) { - case 0: /* invalid, so ignore */ case 1: /* standard orientation, do nothing */ break; case 2: /* flipped right-left */ @@ -116,7 +115,7 @@ jpeg_apply_exif_data_to_image (const gchar *filename, case 8: /* 90 CCW */ gimp_image_rotate (image_ID, GIMP_ROTATE_270); break; - default: /* invalid, ignore */ + default: /* can't happen */ break; } } diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 22cadc6545..6d2cd50a69 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -32,12 +32,10 @@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po -install_sh = @install_sh@ -mkdir_p = @mkdir_p@ -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ +MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ @@ -46,8 +44,8 @@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot +MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist +GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot DEFS = @DEFS@ CFLAGS = @CFLAGS@ @@ -60,7 +58,7 @@ COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ -DISTFILES = ChangeLog Makefile.in.in POTFILES.in \ +DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ @@ -77,13 +75,13 @@ INSTOBJEXT = @INSTOBJEXT@ .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot - $(MSGMERGE) $< $(top_builddir)/po/$(GETTEXT_PACKAGE).pot -o $*pox + $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: - file=`echo $* | sed 's,.*/,,'`.gmo \ + file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -o $$file $< .po.cat: @@ -96,7 +94,7 @@ all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: -$(GETTEXT_PACKAGE).pot: $(POTFILES) +$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(GENPOT) install: install-exec install-data @@ -104,7 +102,7 @@ install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all - if test -n "$(MKINSTALLDIRS)"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ @@ -118,7 +116,7 @@ install-data-yes: all esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ - if test -n "$(MKINSTALLDIRS)"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ @@ -146,7 +144,7 @@ install-data-yes: all fi; \ done if test "$(PACKAGE)" = "glib"; then \ - if test -n "$(MKINSTALLDIRS)"; then \ + if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ @@ -179,7 +177,7 @@ check: all dvi info tags TAGS ID: mostlyclean: - rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp + rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o rm -f .intltool-merge-cache @@ -194,7 +192,7 @@ maintainer-clean: distclean rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) -dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot +dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ @@ -204,14 +202,14 @@ dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ + cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ - result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ - if $$result; then \ - if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ + if $$tmpdir/$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -o $$tmpdir/$$lang.new.po $$lang; then \ + if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \