--- /dev/null
+# tizen-platform-config
+
+Target functions for tizen-platform-config project (platform/core/system/tizen-platform-config)
+
+Fuzzed functions:
+* tzplatform_mkstr(enum tzplatform_variable id, const char *str)
+* tzplatform_mkpath(enum tzplatform_variable id, const char *path)
--- /dev/null
+#!/bin/bash -e
+
+BUILD_HOME=/home/abuild/rpmbuild/BUILD/tizen-platform-config-4.0/src
+CXX=g++
+SOURCE=tzplatform-fuzz.cpp
+CFLAGS="-g -I${BUILD_HOME} -Wall -Wextra"
+LDFLAGS="-L${BUILD_HOME}/.libs -lpthread -ltzplatform-config-2.0"
+OUT=tzplatfrom-fuzz.out
+LIBFUZZER=$(rpm -ql libFuzzer 2>/dev/null | grep libFuzzer.a)
+
+if [[ -z $LIBFUZZER ]]; then
+ echo "libFuzzer is not installed!"
+ exit 1
+fi
+
+${CXX} ${CFLAGS} ${SOURCE} ${LIBFUZZER} ${LDFLAGS} -o ${OUT}
--- /dev/null
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "tzplatform_variables.h"
+#include "tzplatform_config.h"
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
+ char *str = (char*)malloc(size+1);
+ if (str != NULL) {
+ memcpy(str, data, size);
+ str[size] = '\0';
+ }
+
+ int i = 0;
+ while(i != tzplatform_getcount()) {
+ enum tzplatform_variable id = (enum tzplatform_variable) i;
+ // For both below functions:
+ // the returned value is an allocated unique string that MUST not be freed.
+ tzplatform_mkstr(id, str);
+ tzplatform_mkpath(id, str);
+ i++;
+ }
+ free(str);
+
+ return 0;
+}