瀏覽代碼

Seek over EXIF APP0 frame instead of reading and discarding it

master
Bert Münnich 11 年之前
父節點
當前提交
1b089bc2fa
共有 2 個檔案被更改,包括 4 行新增3 行删除
  1. +1
    -1
      Makefile
  2. +3
    -2
      exif.c

+ 1
- 1
Makefile 查看文件

@@ -1,4 +1,4 @@
VERSION = git-20130907
VERSION = git-20131005

PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man


+ 3
- 2
exif.c 查看文件

@@ -79,9 +79,10 @@ int exif_orientation(const fileinfo_t *file)
goto abort;
if (s_read(fd, file->name, data, 4) < 0)
goto abort;
if (btous(data, order) == JPEG_MARKER_APP0){

if (btous(data, order) == JPEG_MARKER_APP0) {
len = btous(data + 2, order);
if (s_read(fd, file->name, data, len - 2) < 0)
if (lseek(fd, len - 2, SEEK_CUR) == (off_t) -1)
goto abort;
if (s_read(fd, file->name, data, 4) < 0)
goto abort;


Loading…
取消
儲存