json-c: Update, enable shared & refresh patch.

This fixes CVE-2013-6371 and CVE-2013-6370.
This commit is contained in:
Tobias Gruetzmacher 2014-10-12 20:11:10 +02:00
parent 3c2562b8d2
commit 847683cd5c
3 changed files with 32 additions and 15 deletions

View File

@ -3,14 +3,14 @@ See index.html for further information.
see http://lists.fedoraproject.org/pipermail/mingw/2009-May/001567.html
--- a/configure.in 2012-07-12 01:57:09.000000000 +0200
+++ b/configure.in 2012-07-12 01:59:06.000000000 +0200
@@ -25,8 +25,6 @@
--- a/configure.ac 2014-04-11 03:47:07.000000000 +0200
+++ b/configure.ac 2014-10-12 19:44:52.809838565 +0200
@@ -40,8 +40,6 @@
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MEMCMP
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_CHECK_FUNCS(strcasecmp strdup strndup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
#check if .section.gnu.warning accepts long strings (for __warn_references)
AC_CHECK_FUNCS(strcasecmp strdup strerror snprintf vsnprintf vasprintf open vsyslog strncasecmp setlocale)
AC_CHECK_DECLS([INFINITY], [], [], [[#include <math.h>]])
AC_CHECK_DECLS([nan], [], [], [[#include <math.h>]])

View File

@ -0,0 +1,21 @@
This file is part of MXE.
See index.html for further information.
mingw32 doesn't include wincrypt.h in windows.h, so the build fails.
This is basically
https://github.com/ams-cs/json-c/commit/ca0ebe0f71b806f73a20d5d5e0da78aba5de42be
--- a/random_seed.c 2014-04-11 02:41:08.000000000 +0200
+++ b/random_seed.c 2014-10-12 20:07:32.419043270 +0200
@@ -181,7 +181,10 @@
#define HAVE_CRYPTGENRANDOM 1
#include <windows.h>
+#include <wincrypt.h>
+#ifndef __GNUC__
#pragma comment(lib, "advapi32.lib")
+#endif
static int get_cryptgenrandom_seed()
{

View File

@ -3,8 +3,8 @@
PKG := json-c
$(PKG)_IGNORE :=
$(PKG)_VERSION := 0.11
$(PKG)_CHECKSUM := 4bae2468bfd73a2b2eec7419c75c262b5833f567
$(PKG)_VERSION := 0.12
$(PKG)_CHECKSUM := c6d8019c706af146006aa6cd91839c7d3c581e94
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-nodoc.tar.gz
$(PKG)_URL := https://s3.amazonaws.com/$(PKG)_releases/releases/$($(PKG)_FILE)
@ -21,17 +21,13 @@ endef
define $(PKG)_BUILD
cd '$(1)' && ./autogen.sh
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--prefix='$(PREFIX)/$(TARGET)' \
--build="`config.guess`"\
--disable-shared
$(MXE_CONFIGURE_OPTS) \
CFLAGS=-Wno-error
$(MAKE) -C '$(1)' -j '$(JOBS)' install
$(MAKE) -C '$(1)' -j '$(JOBS)' install $(MXE_REMOVE_CRUFT)
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-json-c.exe' \
`'$(TARGET)-pkg-config' json --cflags --libs`
`'$(TARGET)-pkg-config' json-c --cflags --libs`
endef
$(PKG)_BUILD_SHARED =