]> git.pld-linux.org Git - packages/file.git/blame - file-magic.patch
- add selinux types; fix error path in fsmagic.c and do proper array terminating...
[packages/file.git] / file-magic.patch
CommitLineData
7ec63bd1
AM
1--- file-4.14/src/fsmagic.c.magic 2005-06-25 17:52:14.000000000 +0200
2+++ file-4.14/src/fsmagic.c 2005-07-14 09:47:08.000000000 +0200
3@@ -92,7 +92,8 @@
4 if (file_printf(ms, "cannot open `%s' (%s)",
5 fn, strerror(errno)) == -1)
6 return -1;
7- return 1;
8+ ms->haderr++;
9+ return -1;
10 }
11
12 if ((ms->flags & MAGIC_MIME) != 0) {
13--- file-4.14/src/file.c.magic 2005-03-06 06:58:22.000000000 +0100
14+++ file-4.14/src/file.c 2005-07-14 09:47:08.000000000 +0200
15@@ -362,7 +362,8 @@
16 }
17
18 while (fgets(buf, MAXPATHLEN, f) != NULL) {
19- buf[file_mbswidth(buf)-1] = '\0';
20+ // cut off CR, we _need_ bytes here, not characters
21+ buf[strlen(buf)-1] = '\0';
22 process(buf, wid);
23 if(nobuffer)
24 (void) fflush(stdout);
25
This page took 0.092382 seconds and 4 git commands to generate.