Permalink
Browse files

prevent infinite recursion.

  • Loading branch information...
zoulasc committed Feb 11, 2014
1 parent a7eee67 commit 3c081560c23f20b2985c285338b52c7aae9fdb0f
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/softmagic.c
View
@@ -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"
@@ -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;

0 comments on commit 3c08156

Please sign in to comment.