From: Christos Zoulas Date: Fri, 28 Apr 1995 19:13:08 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: FILE3_27~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=deb7e8bd50ebdfc9a069428aa4981e5c96f3aa47;p=file *** empty log message *** --- diff --git a/src/softmagic.c b/src/softmagic.c index 1efc367e..92d4d773 100644 --- a/src/softmagic.c +++ b/src/softmagic.c @@ -34,7 +34,7 @@ #ifndef lint static char *moduleid = - "@(#)$Id: softmagic.c,v 1.28 1995/04/28 17:29:13 christos Exp $"; + "@(#)$Id: softmagic.c,v 1.29 1995/04/28 19:13:08 christos Exp $"; #endif /* lint */ static int match __P((unsigned char *, int)); @@ -287,7 +287,7 @@ struct magic *m; int nbytes; { long offset = m->offset; - long diff = (offset + sizeof(union VALUETYPE)) - nbytes; + long diff = nbytes - (offset + sizeof(union VALUETYPE)); if (diff >= 0) memcpy(p, s + offset, sizeof(union VALUETYPE)); else {