diff options
author | Ting-Wei Lan <lantw44@gmail.com> | 2013-08-03 23:42:44 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-08-03 23:42:44 +0800 |
commit | c0603c06173781dc34090cd784d81a6fb46288fb (patch) | |
tree | 7880d21cdaf2917eb830ca40a2ec0341e9cc951a | |
parent | 51466a704c52f4eedfaa57b8b9684c2cb42dfb1f (diff) | |
download | gsoc2013-libgnome-autoar-c0603c06173781dc34090cd784d81a6fb46288fb.tar.gz gsoc2013-libgnome-autoar-c0603c06173781dc34090cd784d81a6fb46288fb.tar.zst gsoc2013-libgnome-autoar-c0603c06173781dc34090cd784d81a6fb46288fb.zip |
Prevent opening and reading non-regular files
-rw-r--r-- | gnome-autoar/autoar-create.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnome-autoar/autoar-create.c b/gnome-autoar/autoar-create.c index 1a81c9f..388c325 100644 --- a/gnome-autoar/autoar-create.c +++ b/gnome-autoar/autoar-create.c @@ -398,8 +398,8 @@ autoar_create_do_write_data (AutoarCreate *arcreate, g_debug ("autoar_create_do_write_data: write header OK"); - /* Symlinks have size > 0, but there is nothing to write */ - if (archive_entry_size (entry) > 0 && archive_entry_filetype (entry) != AE_IFLNK) { + /* Non-regular files have no content to write */ + if (archive_entry_size (entry) > 0 && archive_entry_filetype (entry) == AE_IFREG) { GInputStream *istream; ssize_t read_actual, written_actual, written_acc; |