summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Fiard <quentin.fiard@polytechnique.org>2013-11-04 20:34:55 +0000
committerQuentin Fiard <quentin.fiard@polytechnique.org>2013-11-04 20:34:55 +0000
commit91bd200b14a81d23f0847c4c82641c31dca7f4ff (patch)
treefacc40482f9d77ef53d8eac999668ce73d82343f
parentce07a29894acd74c52b975a42c02f11d9483566a (diff)
downloadbsdiff-91bd200b14a81d23f0847c4c82641c31dca7f4ff.tar.gz
Fixed length of header read after switch to ENDSLEY/BSDIFF43
The header is formed of an identifier of the version of bsdiff used concatenated with the length of the patched file. The change to a 16 bytes identifier caused the length to be omitted from the read, breaking the utility.
-rw-r--r--bspatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bspatch.c b/bspatch.c
index 7de0a08..10fb62b 100644
--- a/bspatch.c
+++ b/bspatch.c
@@ -147,7 +147,7 @@ int main(int argc,char * argv[])
err(1, "fopen(%s)", argv[3]);
/* Read header */
- if (fread(header, 1, 16, f) != 16) {
+ if (fread(header, 1, 24, f) != 24) {
if (feof(f))
errx(1, "Corrupt patch\n");
err(1, "fread(%s)", argv[3]);