diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9aecf32
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+SOURCES/libfastjson-0.99.4.tar.gz
diff --git a/.libfastjson.metadata b/.libfastjson.metadata
new file mode 100644
index 0000000..d582aae
--- /dev/null
+++ b/.libfastjson.metadata
@@ -0,0 +1 @@
+f8f11a0635c87abde03367fbb4fe13bf3fdb514e SOURCES/libfastjson-0.99.4.tar.gz
diff --git a/README.md b/README.md
deleted file mode 100644
index 98f42b4..0000000
--- a/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-The master branch has no content
-
-Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6
-If you find this file in a distro specific branch, it means that no content has been checked in yet
diff --git a/SOURCES/libfastjson-0.99.4-rhbz1421612-nullptr-guard.patch b/SOURCES/libfastjson-0.99.4-rhbz1421612-nullptr-guard.patch
new file mode 100644
index 0000000..9c9b967
--- /dev/null
+++ b/SOURCES/libfastjson-0.99.4-rhbz1421612-nullptr-guard.patch
@@ -0,0 +1,28 @@
+From 8793b9a1bda1d6e182a1118a6f1a0688f530a545 Mon Sep 17 00:00:00 2001
+From: Jiri Vymazal <jvymazal@redhat.com>
+Date: Thu, 2 Mar 2017 12:35:37 +0100
+Subject: [PATCH] add nullptr guard
+
+---
+ json_object.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/json_object.c b/json_object.c
+index b01782e..f8fc41b 100644
+--- a/json_object.c
++++ b/json_object.c
+@@ -201,9 +201,11 @@ int fjson_object_put(struct fjson_object *jso)
+ 
+ static void fjson_object_generic_delete(struct fjson_object* jso)
+ {
+-	printbuf_free(jso->_pb);
+-	DESTROY_ATOMIC_HELPER_MUT(jso->_mut_ref_count);
+-	free(jso);
++	if (jso) {
++		printbuf_free(jso->_pb);
++		DESTROY_ATOMIC_HELPER_MUT(jso->_mut_ref_count);
++		free(jso);
++	}
+ }
+ 
+ static struct fjson_object* fjson_object_new(const enum fjson_type o_type)
diff --git a/SPECS/libfastjson.spec b/SPECS/libfastjson.spec
new file mode 100644
index 0000000..84d8de6
--- /dev/null
+++ b/SPECS/libfastjson.spec
@@ -0,0 +1,71 @@
+Name:		libfastjson
+Version:	0.99.4
+Release:	2%{?dist}
+Summary:	A JSON implementation in C
+License:	MIT
+URL:		https://github.com/rsyslog/libfastjson
+Source0:	http://download.rsyslog.com/libfastjson/libfastjson-%{version}.tar.gz
+
+# 1421612 - New defect found in libfastjson-0.99.4-1.el7
+Patch0: libfastjson-0.99.4-rhbz1421612-nullptr-guard.patch
+
+%description
+LIBFASTJSON implements a reference counting object
+model that allows you to easily construct JSON
+objects in C, output them as JSON formatted strings
+and parse JSON formatted strings back into the
+C representation of JSON objects.
+
+%package	devel
+Summary:	Development files for libfastjson
+Group:		Development/Libraries
+Requires:	%{name}%{?_isa} = %{version}-%{release}
+
+%description	devel
+This package contains libraries and header files for
+developing applications that use libfastjson.
+
+%prep
+%setup -q
+%patch0 -p1
+
+for doc in ChangeLog; do
+ iconv -f iso-8859-1 -t utf8 $doc > $doc.new &&
+ touch -r $doc $doc.new &&
+ mv $doc.new $doc
+done
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" # temporary workaround for EPEL5, fixed upstream
+%configure --enable-shared --disable-static
+
+%install
+make V=1 DESTDIR=%{buildroot} install
+find %{buildroot} -name '*.la' -delete -print
+
+%check
+make V=1 check
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license COPYING
+%doc AUTHORS ChangeLog README.html
+%{_libdir}/libfastjson.so.*
+
+%files devel
+%{_includedir}/libfastjson
+%{_libdir}/libfastjson.so
+%{_libdir}/pkgconfig/libfastjson.pc
+
+%changelog
+* Tue Mar 07 2017 Daniel Kopecek <dkopecek@redhat.com> - 0.99.4-2
+- Fix defect found by clang-analyzer
+  Resolves: #1421612
+
+* Tue Jan 24 2017 Daniel Kopecek <dkopecek@redhat.com> - 0.99.4-1
+- Import
+  Resolves: #1395145