Updates the libinjection

Windows compilation was failing due to the utilization of size_t which is part
of the strings.h. strings.h was not part of windows and so the compilation
was failing. This update fix that. Issue #65 on libinjection:
https://github.com/client9/libinjection/issues/65
This commit is contained in:
Felipe Zimmerle 2014-02-18 05:06:58 -08:00
parent 66939d059b
commit 503e8f6c8e
2 changed files with 20 additions and 5 deletions

View File

@ -11,9 +11,15 @@
#define _LIBINJECTION_H #define _LIBINJECTION_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { # define LIBINJECTION_BEGIN_DECLS extern "C" {
# define LIBINJECTION_END_DECLS }
#else
# define LIBINJECTION_BEGIN_DECLS
# define LIBINJECTION_END_DECLS
#endif #endif
LIBINJECTION_BEGIN_DECLS
/* /*
* Pull in size_t * Pull in size_t
*/ */
@ -43,8 +49,17 @@ const char* libinjection_version(void);
*/ */
int libinjection_sqli(const char* s, size_t slen, char fingerprint[]); int libinjection_sqli(const char* s, size_t slen, char fingerprint[]);
#ifdef __cplusplus /** ALPHA version of xss detector.
} *
#endif * NOT DONE.
*
* \param[in] s input string, may contain nulls, does not need to be null-terminated
* \param[in] slen input string length
* \return 1 if XSS found, 0 if benign
*
*/
int libinjection_xss(const char* s, size_t slen);
LIBINJECTION_END_DECLS
#endif /* _LIBINJECTION_H */ #endif /* _LIBINJECTION_H */

View File

@ -7,7 +7,7 @@ extern "C" {
/* pull in size_t */ /* pull in size_t */
#include <strings.h> #include <stddef.h>
enum html5_type { enum html5_type {
DATA_TEXT DATA_TEXT