|
Message-ID: <20141222102548.JPVJ8.38237.imail@eastrmwml208> Date: Mon, 22 Dec 2014 10:25:48 -0500 From: <jfoug@....net> To: john-dev@...ts.openwall.com Subject: Re: Cygwin ---- Solar Designer <solar@...nwall.com> wrote: > Jim, > > Thanks! In the fallback code, do you somehow ensure that JtR will > refuse to work with files > 2 GB, rather than seek to wrong offsets? > e.g. on Linux this is achieved by building without large file flags, in > which case open(2) is called (by its libc wrapper) without O_LARGEFILE. > How does Cygwin handle this? Ok, I found the change made to wordlist.c, and it looks like will still work (fail) properly. The code used to give a more verbose warning about 32 bit systems. Now it will simply fail with an error message of ftell failure. So I consider this issue resolved. I am not 100% sure about a .pot file or a .log file over 2gb, BUT I think both of those are simply read sequentially, so there should be no 'signed long' seek issues. - /* this will both get us the file length, and tell us - of 'invalid' files (i.e. too big in Win32 or other - 32 bit OS's. A file between 2gb and 4gb returns - a negative number. */ - fseek(word_file, 0, SEEK_END); - file_len = ftell(word_file); - fseek(word_file, 0, SEEK_SET); - if (file_len < 0) { - if (john_main_process) - fprintf(stderr, "Error, dictionary file is too" - " large for john to read (probably a " - "32 bit OS issue)\n"); - error(); - } + jtr_fseek64(word_file, 0, SEEK_END); + if ((file_len = jtr_ftell64(word_file)) == -1) + pexit("ftell"); + jtr_fseek64(word_file, 0, SEEK_SET);
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.