Skip to content

Commit 86aeb49

Browse files
Merge pull request #49 from apple/QuietMisdreavus/sync-upstream-gfm.7
update cmark-gfm to 0.29.0.gfm.8
2 parents 25d503f + 0f871ea commit 86aeb49

31 files changed

+14700
-10687
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ build
3333
cmark.dSYM/*
3434
cmark
3535
.vscode
36+
.DS_Store
3637

3738
# Testing and benchmark
3839
alltests.md

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ set(CMAKE_C_STANDARD_REQUIRED YES)
3131
# Use CMake's generated headers instead of the Swift package prebuilt ones
3232
add_compile_definitions(CMARK_USE_CMAKE_HEADERS)
3333

34+
option(CMARK_FUZZ_QUADRATIC "Build quadratic fuzzing harness" OFF)
35+
36+
if(CMARK_FUZZ_QUADRATIC)
37+
set(FUZZER_FLAGS "-fsanitize=fuzzer-no-link,address -g")
38+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZER_FLAGS}")
39+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZER_FLAGS}")
40+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZER_FLAGS}")
41+
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FUZZER_FLAGS}")
42+
endif()
43+
3444
add_subdirectory(src)
3545
add_subdirectory(extensions)
3646
if(CMARK_TESTS AND (CMARK_SHARED OR CMARK_STATIC))
@@ -41,6 +51,9 @@ if(CMARK_TESTS)
4151
enable_testing()
4252
add_subdirectory(test testdir)
4353
endif()
54+
if(CMARK_FUZZ_QUADRATIC)
55+
add_subdirectory(fuzz)
56+
endif()
4457

4558
if(NOT CMAKE_BUILD_TYPE)
4659
set(CMAKE_BUILD_TYPE "Release" CACHE STRING

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ VERSION?=$(SPECVERSION)
2222
RELEASE?=CommonMark-$(VERSION)
2323
INSTALL_PREFIX?=/usr/local
2424
CLANG_CHECK?=clang-check
25-
CLANG_FORMAT=clang-format-3.5 -style llvm -sort-includes=0 -i
25+
CLANG_FORMAT=clang-format -style llvm -sort-includes=0 -i
2626
AFL_PATH?=/usr/local/bin
2727

2828
.PHONY: all cmake_build leakcheck clean fuzztest test debug ubsan asan mingw archive newbench bench format update-spec afl clang-check docker libFuzzer
@@ -140,7 +140,7 @@ $(EXTDIR)/ext_scanners.c: $(EXTDIR)/ext_scanners.re
140140
esac
141141
re2c --case-insensitive -b -i --no-generation-date -8 \
142142
--encoding-policy substitute -o $@ $<
143-
clang-format-3.5 -style llvm -i $@
143+
clang-format -style llvm -i $@
144144

145145
# We include entities.inc in the repository, so normally this
146146
# doesn't need to be regenerated:
@@ -211,7 +211,7 @@ format:
211211
$(CLANG_FORMAT) src/*.c src/*.h api_test/*.c api_test/*.h
212212

213213
format-extensions:
214-
clang-format-3.5 -style llvm -i extensions/*.c extensions/*.h
214+
clang-format -style llvm -i extensions/*.c extensions/*.h
215215

216216
operf: $(CMARK)
217217
operf $< < $(BENCHFILE) > /dev/null

changelog.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
[0.29.0.gfm.8]
2+
3+
* We restored backwards compatibility by deprecating the `cmark_init_standard_node_flags()` requirement, which is now a noop (#305)
4+
* We added a quadratic complexity fuzzing target (#304)
5+
6+
[0.29.0.gfm.7]
7+
8+
* Fixed a polynomial time complexity issue per
9+
https://github.com/github/cmark-gfm/security/advisories/GHSA-r572-jvj2-3m8p
10+
* Fixed an issue in which crafted markdown document could trigger an
11+
out-of-bounds read in the validate_protocol function per
12+
https://github.com/github/cmark-gfm/security/advisories/GHSA-c944-cv5f-hpvr
13+
* Fixed a polynomial time complexity issue
14+
https://github.com/github/cmark-gfm/security/advisories/GHSA-24f7-9frr-5h2r
15+
* Fixed several polynomial time complexity issues per
16+
https://github.com/github/cmark-gfm/security/advisories/GHSA-29g3-96g3-jg6c
17+
* We removed an unneeded .DS_Store file (#291)
18+
* We added a test for domains with underscores and fix roundtrip behavior (#292)
19+
* We now use an up-to-date clang-format (#294)
20+
* We made a variety of implicit integer trunctions explicit by moving to
21+
size_t as our standard size integer type (#302)
22+
123
[0.29.0.gfm.6]
224
* Fixed polynomial time complexity DoS vulnerability in autolink extension
325

extensions/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
cmake_minimum_required(VERSION 2.8)
21
set(LIBRARY "libcmark-gfm-extensions")
32
set(STATICLIBRARY "libcmark-gfm-extensions_static")
43
set(LIBRARY_SOURCES
@@ -24,7 +23,6 @@ include_directories(include ${CMAKE_CURRENT_BINARY_DIR})
2423

2524
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE} -pg")
2625
set(CMAKE_LINKER_PROFILE "${CMAKE_LINKER_FLAGS_RELEASE} -pg")
27-
add_compiler_export_flags()
2826

2927
if (CMARK_SHARED)
3028
add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES})

0 commit comments

Comments
 (0)