summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hanselmann <public@hansmi.ch>2021-08-13 23:21:58 +0200
committerMichael Hanselmann <public@hansmi.ch>2021-08-13 23:21:58 +0200
commit6ff5aa5050f87515d95fc458a4867cc13a3d1a4a (patch)
treeecadef9a4bb30c31489af860c93b0716019c3502
parent6c5af4ea3bfae915a0498ff062d8b188844b8ee8 (diff)
Move usbredirparser magic value to public header
Currently the fuzzer hardcodes the value of the USBREDIRPARSER_SERIALIZE_MAGIC constant. Move it to usbredirparser.h to allow for its reuse in the fuzzer. Signed-off-by: Michael Hanselmann <public@hansmi.ch>
-rw-r--r--usbredirparser/usbredirparser.c1
-rw-r--r--usbredirparser/usbredirparser.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/usbredirparser/usbredirparser.c b/usbredirparser/usbredirparser.c
index 784f2e1..383b77f 100644
--- a/usbredirparser/usbredirparser.c
+++ b/usbredirparser/usbredirparser.c
@@ -1496,7 +1496,6 @@ void usbredirparser_send_buffered_bulk_packet(struct usbredirparser *parser,
/****** Serialization support ******/
-#define USBREDIRPARSER_SERIALIZE_MAGIC 0x55525031
#define USBREDIRPARSER_SERIALIZE_BUF_SIZE 65536
/* Serialization format, send and receiving endian are expected to be the same!
diff --git a/usbredirparser/usbredirparser.h b/usbredirparser/usbredirparser.h
index db0bc35..fbadbb8 100644
--- a/usbredirparser/usbredirparser.h
+++ b/usbredirparser/usbredirparser.h
@@ -22,6 +22,8 @@
#include "usbredirproto.h"
+#define USBREDIRPARSER_SERIALIZE_MAGIC 0x55525031
+
#ifdef __cplusplus
extern "C" {
#endif