Skip to content

Commit

Permalink
off by one in out of bounds calculations (Jan Kaluza)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoulasc committed Mar 4, 2014
1 parent 8e44ed8 commit 70c65d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/softmagic.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "file.h"

#ifndef lint
FILE_RCSID("@(#)$File: softmagic.c,v 1.176 2014/02/18 17:59:21 kim Exp $")
FILE_RCSID("@(#)$File: softmagic.c,v 1.177 2014/02/21 14:32:48 christos Exp $")
#endif /* lint */

#include "magic.h"
Expand Down Expand Up @@ -72,7 +72,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)))
#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.
Expand Down

0 comments on commit 70c65d2

Please sign in to comment.