Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
prevent infinite recursion.
  • Loading branch information
zoulasc committed Feb 11, 2014
1 parent a7eee67 commit 3c08156
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/softmagic.c
Expand Up @@ -32,7 +32,7 @@
#include "file.h"

#ifndef lint
FILE_RCSID("@(#)$File: softmagic.c,v 1.171 2014/01/08 22:02:06 christos Exp $")
FILE_RCSID("@(#)$File: softmagic.c,v 1.172 2014/01/08 22:22:54 christos Exp $")
#endif /* lint */

#include "magic.h"
Expand Down Expand Up @@ -1738,6 +1738,8 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
break;

case FILE_INDIRECT:
if (offset == 0)
return 0;
if (OFFSET_OOB(nbytes, offset, 0))
return 0;
sbuf = ms->o.buf;
Expand Down

0 comments on commit 3c08156

Please sign in to comment.