fix redefinition of OFFSET_OOB in CVE-2014-2270 patch
This commit is contained in:
parent
1a255d2dd9
commit
7eb85bd79d
@ -45,7 +45,7 @@ index 108d419..d543f87 100644
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
+#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) >= ((n) - (o)))
|
||||
+#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
|
||||
|
||||
private int match(struct magic_set *, struct magic *, uint32_t,
|
||||
const unsigned char *, size_t, size_t, int, int, int, int, int *, int *,
|
||||
|
||||
@ -2,14 +2,6 @@ diff --git a/src/softmagic.c b/src/softmagic.c
|
||||
index d543f87..e84205d 100644
|
||||
--- a/src/softmagic.c
|
||||
+++ b/src/softmagic.c
|
||||
@@ -63,6 +63,7 @@ private void cvt_16(union VALUETYPE *, const struct magic *);
|
||||
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)))
|
||||
/*
|
||||
* softmagic - lookup one file in parsed, in-memory copy of database
|
||||
* Passed the name and FILE * of one file to be typed.
|
||||
@@ -1196,7 +1197,7 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
}
|
||||
switch (cvt_flip(m->in_type, flip)) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Summary: A utility for determining file types
|
||||
Name: file
|
||||
Version: 5.14
|
||||
Release: 18%{?dist}
|
||||
Release: 19%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/File
|
||||
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
|
||||
@ -200,6 +200,9 @@ cd %{py3dir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon Mar 24 2014 Jan Kaluza <jkaluza@redhat.com> - 5.14-19
|
||||
- fix redefinition of OFFSET_OOB in CVE-2014-2270 patch
|
||||
|
||||
* Mon Mar 24 2014 Jan Kaluza <jkaluza@redhat.com> - 5.14-18
|
||||
- fix #1079847 - fix for CVE-2013-7345
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user