Browse Source

Clifford Wolf:


			
			
				rocklinux
			
			
		
Clifford Wolf 19 years ago
parent
commit
d2bfe034fd
2 changed files with 27 additions and 2 deletions
  1. +2
    -2
      package/base/file/file.desc
  2. +25
    -0
      package/base/file/init-mem.patch

+ 2
- 2
package/base/file/file.desc

@ -36,8 +36,8 @@
[L] BSD [L] BSD
[S] Stable [S] Stable
[V] 4.16
[V] 4.17
[P] X -?-3-5---9 103.300 [P] X -?-3-5---9 103.300
[D] 2242223233 file-4.16.tar.gz ftp://ftp.astron.com/pub/file/
[D] 3668382963 file-4.17.tar.gz ftp://ftp.astron.com/pub/file/

+ 25
- 0
package/base/file/init-mem.patch

@ -0,0 +1,25 @@
Taken from file-4.17-2.fc5.src.rpm (file-4.17-init-mem.patch).
--- file-4.17/src/apprentice.c
+++ file-4.17/src/apprentice.c
@@ -380,8 +380,8 @@ apprentice_file(struct magic_set *ms, st
return -1;
}
- maxmagic = MAXMAGIS;
- if ((marray = malloc(maxmagic * sizeof(*marray))) == NULL) {
+ maxmagic = MAXMAGIS;
+ if ((marray = calloc(maxmagic, sizeof(*marray))) == NULL) {
(void)fclose(f);
file_oomem(ms);
return -1;
@@ -509,7 +509,7 @@ parse(struct magic_set *ms, struct magic
char *t;
private const char *fops = FILE_OPS;
uint32_t val;
- uint32_t cont_level, cont_count;
+ uint32_t cont_level;
cont_level = 0;

Loading…
Cancel
Save