Commit Graph

14 Commits (9221f1d9d53b4bb58991b389d8a38bc0301e385e)

Author SHA1 Message Date
Shivani Bhardwaj 92bb52f430 Add wrappers for validating range checks 6 years ago
Shivani Bhardwaj 6b2c7d5be8 util: Add StringParse* functions
StringParse* functions would perform a stricter check compared to
ByteExtractString* functions. These new functions shall also check if
any extra characters follow the extracted numeric value in addition to
the checks performed by ByteExtractString* and return -1 in that case.
This is particularly important in parser, configuration and setup functions.
6 years ago
Philippe Antoine 5f95822f8b doc: fix typo in ByteExtractUint32 description 6 years ago
Victor Julien 20f9b0d9c6 byte: add bytes to string w/o allocation 7 years ago
Victor Julien a2c9b86cdf byteswap: fix compilation on SunOS 9 years ago
Victor Julien c07f5397f4 Introduce BytesToString utility
Introduce a utility function to convert an array of bytes into a
null-terminated string:

 char *BytesToString(const uint8_t *bytes, size_t nbytes);

All non-printables are copied over, except for '\0', which is
turned into literal '\' '0' in the string. So the resulting string
may be bigger than the input.
12 years ago
Victor Julien 55da9787a4 Win32 compile fixes. 14 years ago
Eric Leblond 4e9231266a Compilation fix for OpenBSD and win32.
This patch fixes compilation on OpenBSD platform. It is running
fine on a pcap file. The patch should also fix compilation on
WIN32 platform but this is not tested.
15 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 16 years ago
Pablo Rincon b1d1ea87ff Moving inline functions to the .h files, so gcc can inline them correctly 16 years ago
Jan Jezek fe6a72befc Code is now compilable on the Win32 platform 16 years ago
root ddf5995049 endianness handling update 16 years ago
Brian Rectanus 11d068740a Byte utils return num bytes extracted on success instead of zero. 16 years ago
Brian Rectanus af06e6a288 Added byte extraction util. 16 years ago