php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch libmagic-fix-incorrect-msword-detection for Filesystem function related Bug #64462

Patch version 2013-03-20 12:06 UTC

Return to Bug #64462 | Download this patch
Patch Revisions:

Developer: vitalif@mail.ru

--- php5-orig/ext/fileinfo/libmagic/readcdf.c	2013-03-20 15:56:38.000000000 +0400
+++ php5-patched/ext/fileinfo/libmagic/readcdf.c	2013-03-20 15:52:29.000000000 +0400
@@ -295,7 +295,7 @@ file_trycdf(struct magic_set *ms, int fd
 		    d = &dir.dir_tab[j];
 		    for (k = 0; k < sizeof(name); k++)
 			name[k] = (char)cdf_tole2(d->d_name[k]);
-		    if (strstr(name, "WordDocument") == 0) {
+		    if (strstr(name, "WordDocument") != 0) {
 			str = "msword";
 			break;
 		    }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 10 20:01:37 2024 UTC