diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-07 03:52:15 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-03-07 03:52:15 +0000 |
commit | d44823e5676f0edd0e259c7c33d5640a043748ac (patch) | |
tree | a861b18b863dacb947ba2b8e9cbcb47ef80a03ef /core/file/file-5.17-off-by-one.patch | |
parent | c183da9d3df5445f5021cd6563012ba2abfc393e (diff) |
Fri Mar 7 03:48:12 UTC 2014
Diffstat (limited to 'core/file/file-5.17-off-by-one.patch')
-rw-r--r-- | core/file/file-5.17-off-by-one.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/core/file/file-5.17-off-by-one.patch b/core/file/file-5.17-off-by-one.patch new file mode 100644 index 000000000..0e8beb442 --- /dev/null +++ b/core/file/file-5.17-off-by-one.patch @@ -0,0 +1,25 @@ +From 70c65d2e1841491f59168db1f905e8b14083fb1c Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Tue, 4 Mar 2014 17:42:19 +0000 +Subject: [PATCH] off by one in out of bounds calculations (Jan Kaluza) + +--- + src/softmagic.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/softmagic.c b/src/softmagic.c +index 170de95..5ed3998 100644 +--- a/src/softmagic.c ++++ b/src/softmagic.c +@@ -72,7 +72,7 @@ private int mcopy(struct magic_set *, union VALUETYPE *, int, int, + private void cvt_32(union VALUETYPE *, const struct magic *); + private void cvt_64(union VALUETYPE *, const struct magic *); + +-#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) >= ((n) - (o))) ++#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o))) + /* + * softmagic - lookup one file in parsed, in-memory copy of database + * Passed the name and FILE * of one file to be typed. +-- +1.8.5.5 + |