From: <lu...@us...> - 2002-10-22 20:02:24
|
Update of /cvsroot/libexif/exif/exif In directory usw-pr-cvs1:/tmp/cvs-serv29213/exif Modified Files: main.c Log Message: 2002-10-22 Lutz Müller <lu...@us...> * exif/main.c: Fix segfault. Index: main.c =================================================================== RCS file: /cvsroot/libexif/exif/exif/main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- main.c 22 Oct 2002 19:53:53 -0000 1.25 +++ main.c 22 Oct 2002 20:02:21 -0000 1.26 @@ -316,7 +316,8 @@ if (list_tags) { action_tag_table (*args, ed); } else if (tag && !set_value) { - if (ifd >= 0) { + if ((ifd >= EXIF_IFD_0) && + (ifd < EXIF_IFD_COUNT)) { e = exif_content_get_entry ( ed->ifd[ifd], tag); if (e) @@ -439,7 +440,8 @@ } /* ... and an IFD. */ - if (ifd < 0) { + if ((ifd < EXIF_IFD_0) || + (ifd >= EXIF_IFD_COUNT)) { fprintf (stderr, _("You need to " "specify an IFD!")); fputc ('\n', stderr); @@ -533,7 +535,8 @@ } else if (remove) { /* We need an IFD. */ - if (ifd < 0) { + if ((ifd < EXIF_IFD_0) || + (ifd >= EXIF_IFD_COUNT)) { fprintf (stderr, _("You need to " "specify an IFD!")); fputc ('\n', stderr); |