| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This should make some functions thread-safe, even if it doesn't make
them fully-reentrant; at least some of them would requiree API changes
to full reentrancy.
This should fix #1174.
|
|
|
|
| |
Fixes fencepost errors in git commit 5a41835
|
|
|
|
|
|
|
| |
Explicitly check for the characters we care about, to make it clearer
what we're doing.
Fix a bug introduced by an earlier change in the process.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of them are locale-dependent, and all of them run the risk of
failing if you hand them a char with the 8th bit set.
Define our own locale-independent macros that can be handed any integral
value.
Don't include <ctype.h>.
This should address the issue in GitHub pull request #839, and should
also catch any (highly unlikely) cases in which something other than
Boring Old Space And Tab and, sometimes, CR and LF are treated as white
space. (No, we don't want FF or VT treated as white space.)
|
|
|
|
|
| |
Cast bytes read from getc(), and already known not to be EOF, to u_char
before treating them as unsigned 8-bit bytes.
|
|
|
|
|
|
|
|
|
| |
xdtoi turns an (unsigned) 8-bit character from a string into a hex digit
value, which is also an unsigned 8-bit byte value; make it take a u_char
as an argument and return a u_char, and make the octet value accumulated
in pcap_next_etherent() a u_char as well.
Use a size_t variable for a size.
|
| |
|
|
|
|
|
| |
On Windows, in each file, include whatever that particular file needs,
just as we do on UN*X and MS-DOS.
|
|
|
|
|
|
|
|
|
| |
Have pcap-types.h arrange to define the intN_t/u_intN_t types, and the
INTn_MAX/UINTn_MAX values, on all platforms, and use it wherever it's
appropriate.
Include it up front in scanner.l, to avoid redefinitions of the
INTn_MAX/UINTn_MAX types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can get an EOF at any time, either due to a file that doesn't end
cleanly with an NL or due to an I/O error. In pcap_next_etherent(),
every time we call a routine that returns a character from the file,
check for EOF and return NULL.
(According to the C90 standard (and presumably all subsequent standards),
1) you can safely pass EOF to all the isXXX() macros and 2) EOF is not a
space character, so we don't need to check for EOF there.)
This should address the concerns of Coverity CID 1416964; hopefully
Coverity realizes that getc() returns either a nonnegative value or EOF,
and therefore that checking for EOF is sufficient to ensure that the
return value is nonnegative. (Given how much it complains about
strcmp() with a string constant, because some tests can be evaluated at
compile time and therefore some code happens to be unreachable in that
particular call - code that will be optimized out by any competent
compiler - I'm not going to *assume* Coverity has a clue there.)
|
|
|
|
|
|
|
|
| |
This can prevent bizarre failures if, for example, you've done a
configuration in the top-level source directory, leaving behind one
config.h file, and then do an out-of-tree build in another directory,
with different configuration options. This way, we always pick up the
same config.h, in the build directory.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's _WIN32, with a leading underscore, not WIN32. See, for example:
https://sourceforge.net/p/predef/wiki/OperatingSystems/
and
https://msdn.microsoft.com/en-us/library/b0084kay.aspx
*Some* environments may also define WIN32, but we shouldn't depend on
that.
|
|
|
|
|
|
| |
This change removes CVS keywords that express that the file belongs to
libpcap repository. All such keywords represented the revision and
timestamp by the end of 2008 or even older.
|
| |
|
|
|
|
|
|
|
|
| |
source directory and the target include directory, and have include
files at the top-level directory to include those headers, for backwards
compatibility.
Update the FILES and INSTALL.txt files to reflect current reality.
|
|
|
|
| |
warnings from newer versions of GCC.
|
| |
|
|
|