cpio/cpio-2.11-treat-read-errors.patch
Pavel Raiskup 1aa0682c3e cpio: treat read() errors properly
Resolves: #996150
Version: 2.11-24
2013-09-30 09:18:27 +02:00

42 lines
1.2 KiB
Diff

commit 57288911a7882d663d6aa231158a3616f2ab2ed9
Author: Pavel Raiskup <praiskup@redhat.com>
AuthorDate: Mon Sep 23 15:35:30 2013 +0200
Commit: Pavel Raiskup <praiskup@redhat.com>
CommitDate: Mon Sep 23 16:42:11 2013 +0200
Use ssize_t for input buffer size
Bug report: https://bugzilla.redhat.com/show_bug.cgi?id=996150
* src/global.c: Use ssize_t rather than size_t for input_size.
* src/extern.h: Likewise.
diff --git a/src/extern.h b/src/extern.h
index ef00242..1e7193e 100644
--- a/src/extern.h
+++ b/src/extern.h
@@ -83,7 +83,8 @@ extern int debug_flag;
extern char *input_buffer, *output_buffer;
extern char *in_buff, *out_buff;
extern size_t input_buffer_size;
-extern size_t input_size, output_size;
+extern ssize_t input_size;
+extern size_t output_size;
extern off_t input_bytes, output_bytes;
extern char *directory_name;
diff --git a/src/global.c b/src/global.c
index e08e188..a08006e 100644
--- a/src/global.c
+++ b/src/global.c
@@ -156,7 +156,8 @@ size_t input_buffer_size;
char *in_buff, *out_buff;
/* Current number of bytes stored at `input_buff' and `output_buff'. */
-size_t input_size, output_size;
+ssize_t input_size;
+size_t output_size;
off_t input_bytes, output_bytes;