aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/test/no_nul.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/univalue/test/no_nul.cpp')
-rw-r--r--src/univalue/test/no_nul.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/univalue/test/no_nul.cpp b/src/univalue/test/no_nul.cpp
new file mode 100644
index 0000000000..83d292200b
--- /dev/null
+++ b/src/univalue/test/no_nul.cpp
@@ -0,0 +1,8 @@
+#include "univalue.h"
+
+int main (int argc, char *argv[])
+{
+ char buf[] = "___[1,2,3]___";
+ UniValue val;
+ return val.read(buf + 3, 7) ? 0 : 1;
+}