nsxiv1b089bc
Seek over EXIF APP0 frame instead of reading and discarding it
+4 −3
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20130907 | |
| 1 | + | VERSION = git-20131005 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -79,9 +79,10 @@ int exif_orientation(const fileinfo_t *file) | |||
| 79 | 79 | goto abort; | |
| 80 | 80 | if (s_read(fd, file->name, data, 4) < 0) | |
| 81 | 81 | goto abort; | |
| 82 | − | if (btous(data, order) == JPEG_MARKER_APP0){ | |
| 82 | + | ||
| 83 | + | if (btous(data, order) == JPEG_MARKER_APP0) { | |
| 83 | 84 | len = btous(data + 2, order); | |
| 84 | − | if (s_read(fd, file->name, data, len - 2) < 0) | |
| 85 | + | if (lseek(fd, len - 2, SEEK_CUR) == (off_t) -1) | |
| 85 | 86 | goto abort; | |
| 86 | 87 | if (s_read(fd, file->name, data, 4) < 0) | |
| 87 | 88 | goto abort; | |