]> git.pld-linux.org Git - packages/file.git/blob - file-offset.patch
- rel 2; zero offset (workaround)
[packages/file.git] / file-offset.patch
1 --- file-4.18.org/src/funcs.c   2006-10-31 20:37:17.000000000 +0100
2 +++ file/src/funcs.c    2006-11-25 00:52:17.259907000 +0100
3 @@ -151,10 +151,16 @@
4  protected int
5  file_reset(struct magic_set *ms)
6  {
7 +       struct mlist *ml;
8         if (ms->mlist == NULL) {
9                 file_error(ms, 0, "no magic files loaded");
10                 return -1;
11         }
12 +       for (ml = ms->mlist->next; ml != ms->mlist; ml = ml->next) {
13 +               uint32_t magindex;
14 +               for (magindex = 0; magindex < ml->nmagic; magindex++)
15 +                       ml->magic[magindex].offset = 0;
16 +       }
17         ms->o.ptr = ms->o.buf;
18         ms->haderr = 0;
19         ms->error = -1;
This page took 0.047041 seconds and 4 git commands to generate.