- Timestamp:
- Oct 7, 2010, 12:44:47 AM (10 years ago)
- Location:
- zzuf/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/configure.ac
r4661 r4676 55 55 AC_CHECK_FUNCS(__open64 __lseek64 __fopen64 __freopen64 __ftello64 __fseeko64 __fsetpos64) 56 56 AC_CHECK_FUNCS(__fgets_chk __fgets_unlocked_chk __fread_chk __fread_unlocked_chk __read_chk __recv_chk __recvfrom_chk) 57 AC_CHECK_FUNCS(CreateFileA CreateFileW Re adFile CloseHandle)57 AC_CHECK_FUNCS(CreateFileA CreateFileW ReOpenFile ReadFile CloseHandle) 58 58 59 59 AC_CHECK_TYPES(sighandler_t, [], [], -
zzuf/trunk/msvc/config.h
r4661 r4676 80 80 /* #undef HAVE_RECVMSG */ 81 81 /* #undef HAVE_REGEX_H */ 82 #define HAVE_REOPENFILE 1 82 83 /* #undef HAVE_SETENV */ 83 84 /* #undef HAVE_SETRLIMIT */ -
zzuf/trunk/src/common/fd.c
r4253 r4676 46 46 47 47 /* File descriptor cherry picking */ 48 static int *list = NULL;49 static int static_list[512];48 static int64_t *list = NULL; 49 static int64_t static_list[512]; 50 50 51 51 /* File descriptor stuff. When program is launched, we use the static array of … … 398 398 return 0; 399 399 400 return files[fds[fd]].already_fuzzed + files[fds[fd]].already_pos401 - files[fds[fd]].pos;400 return (int)(files[fds[fd]].already_fuzzed + files[fds[fd]].already_pos 401 - files[fds[fd]].pos); 402 402 } 403 403 -
zzuf/trunk/src/common/fuzz.c
r4253 r4676 47 47 48 48 /* Per-offset byte protection */ 49 static int *ranges = NULL;50 static int static_ranges[512];49 static int64_t *ranges = NULL; 50 static int64_t static_ranges[512]; 51 51 52 52 /* Per-value byte protection */ -
zzuf/trunk/src/common/ranges.c
r4253 r4676 33 33 * the static array static_ranges is used. It is the caller's duty to call 34 34 * free() if the returned value is not static_ranges. */ 35 int *_zz_allocrange(char const *list, int *static_ranges)35 int64_t *_zz_allocrange(char const *list, int64_t *static_ranges) 36 36 { 37 37 char const *parser; 38 int *ranges;38 int64_t *ranges; 39 39 unsigned int i, chunks; 40 40 … … 45 45 46 46 if(chunks >= 256) 47 ranges = malloc((chunks + 1) * 2 * sizeof( unsigned int));47 ranges = malloc((chunks + 1) * 2 * sizeof(int64_t)); 48 48 else 49 49 ranges = static_ranges; … … 70 70 } 71 71 72 int _zz_isinrange(int value, int const *ranges)72 int _zz_isinrange(int64_t value, int64_t const *ranges) 73 73 { 74 int const *r;74 int64_t const *r; 75 75 76 76 if(!ranges) -
zzuf/trunk/src/common/ranges.h
r4253 r4676 15 15 */ 16 16 17 int *_zz_allocrange(char const *, int *);18 int _zz_isinrange(int , int const *);17 int64_t *_zz_allocrange(char const *, int64_t *); 18 int _zz_isinrange(int64_t, int64_t const *); 19 19 -
zzuf/trunk/src/libzzuf/lib-win32.c
r4673 r4676 28 28 # include <windows.h> 29 29 #endif 30 #if defined HAVE_IO_H 31 # include <io.h> 32 #endif 30 33 31 34 #include "common.h" … … 46 49 LPSECURITY_ATTRIBUTES, 47 50 DWORD, DWORD, HANDLE); 51 #endif 52 #if defined HAVE_REOPENFILE 53 static HANDLE (__stdcall *ORIG(ReOpenFile))(HANDLE, DWORD, 54 DWORD, DWORD); 48 55 #endif 49 56 #if defined HAVE_READFILE … … 69 76 lpSecurityAttributes, dwCreationDisposition, 70 77 dwFlagsAndAttributes, hTemplateFile); 71 debug("CreateFileA(\"%s\", 0x%x, 0x%x, ..., 0x%x, 0x%x, ...) = [%i]",78 debug("CreateFileA(\"%s\", 0x%x, 0x%x, {...}, 0x%x, 0x%x, {...}) = %i", 72 79 lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, 73 80 dwFlagsAndAttributes, (int)ret); … … 86 93 lpSecurityAttributes, dwCreationDisposition, 87 94 dwFlagsAndAttributes, hTemplateFile); 88 debug("CreateFileW(\"%S\", 0x%x, 0x%x, ..., 0x%x, 0x%x, ...) = [%i]",95 debug("CreateFileW(\"%S\", 0x%x, 0x%x, {...}, 0x%x, 0x%x, {...}) = %i", 89 96 lpFileName, dwDesiredAccess, dwShareMode, dwCreationDisposition, 90 97 dwFlagsAndAttributes, (int)ret); 98 return ret; 99 } 100 #endif 101 102 #if defined HAVE_REOPENFILE 103 HANDLE __stdcall NEW(ReOpenFile)(HANDLE hOriginalFile, DWORD dwDesiredAccess, 104 DWORD dwShareMode, DWORD dwFlags) 105 { 106 HANDLE ret; 107 ret = ORIG(ReOpenFile)(hOriginalFile, dwDesiredAccess, 108 dwShareMode, dwFlags); 109 debug("ReOpenFile(%i, 0x%x, 0x%x, 0x%x) = %i", (int)hOriginalFile, 110 dwDesiredAccess, dwShareMode, dwFlags, (int)ret); 91 111 return ret; 92 112 } … … 114 134 BOOL __stdcall NEW(CloseHandle)(HANDLE hObject) 115 135 { 116 return ORIG(CloseHandle)(hObject); 136 BOOL ret; 137 ret = ORIG(CloseHandle)(hObject); 138 debug("CloseHandle(%i) = %i", (int)hObject, ret); 139 return ret; 117 140 } 118 141 #endif -
zzuf/trunk/src/libzzuf/libzzuf.c
r4672 r4676 26 26 # include <windows.h> 27 27 #endif 28 #if defined HAVE_IO_H 29 # include <io.h> 30 #endif 28 31 #if defined HAVE_PROCESS_H 29 32 # include <process.h> … … 118 121 if(tmp) 119 122 #if defined _WIN32 120 _zz_debugfd = _open_osfhandle(( HANDLE)atoi(tmp));123 _zz_debugfd = _open_osfhandle((long)atoi(tmp), 0); 121 124 #else 122 125 _zz_debugfd = atoi(tmp);
Note: See TracChangeset
for help on using the changeset viewer.