summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imsolaris/sun_cddl.c3
-rw-r--r--plugins/mmjsonparse/mmjsonparse.c2
-rw-r--r--plugins/mmutf8fix/mmutf8fix.c11
3 files changed, 11 insertions, 5 deletions
diff --git a/plugins/imsolaris/sun_cddl.c b/plugins/imsolaris/sun_cddl.c
index 6d49c8b..e7f3fa7 100644
--- a/plugins/imsolaris/sun_cddl.c
+++ b/plugins/imsolaris/sun_cddl.c
@@ -18,7 +18,7 @@
*
* CDDL HEADER END
*/
-/* Portions Copyright 2010 by Rainer Gerhards and Adiscon
+/* Portions Copyright 2010-2014 by Rainer Gerhards and Adiscon
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
@@ -39,6 +39,7 @@
* software developed by the University of California, Berkeley, and its
* contributors.
*/
+#include "config.h"
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
diff --git a/plugins/mmjsonparse/mmjsonparse.c b/plugins/mmjsonparse/mmjsonparse.c
index 9c0ab88..9e9f3d9 100644
--- a/plugins/mmjsonparse/mmjsonparse.c
+++ b/plugins/mmjsonparse/mmjsonparse.c
@@ -160,7 +160,7 @@ processJSON(wrkrInstanceData_t *pWrkrData, msg_t *pMsg, char *buf, size_t lenBuf
err = pWrkrData->tokener->err;
if(err != json_tokener_continue)
- errMsg = json_tokener_errors[err];
+ errMsg = json_tokener_error_desc(err);
else
errMsg = "Unterminated input";
} else if((size_t)pWrkrData->tokener->char_offset < lenBuf)
diff --git a/plugins/mmutf8fix/mmutf8fix.c b/plugins/mmutf8fix/mmutf8fix.c
index 351bb12..e529686 100644
--- a/plugins/mmutf8fix/mmutf8fix.c
+++ b/plugins/mmutf8fix/mmutf8fix.c
@@ -254,9 +254,14 @@ doUTF8(instanceData *pData, uchar *msg, int lenMsg)
; /* nothing to do, all well */
} else if((c & 0xe0) == 0xc0) {
/* 2-byte sequence */
- strtIdx = i;
- seqLen = bytesLeft = 1;
- codepoint = c & 0x1f;
+ /* 0xc0 and 0xc1 are illegal */
+ if(c == 0xc0 || c == 0xc1) {
+ msg[i] = pData->replChar;
+ } else {
+ strtIdx = i;
+ seqLen = bytesLeft = 1;
+ codepoint = c & 0x1f;
+ }
} else if((c & 0xf0) == 0xe0) {
/* 3-byte sequence */
strtIdx = i;