From b7666027296a4f89a8ce6b22af335e8aee7a7782 Mon Sep 17 00:00:00 2001 From: Paul Dreik Date: Sat, 14 Sep 2019 03:16:09 +0200 Subject: doh: fix (harmless) buffer overrun Added unit test case 1655 to verify. Close #4352 the code correctly finds the flaws in the old code, if one temporarily restores doh.c to the old version. --- tests/unit/README | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/unit/README') diff --git a/tests/unit/README b/tests/unit/README index b8a513b3b..060b670c6 100644 --- a/tests/unit/README +++ b/tests/unit/README @@ -35,6 +35,9 @@ We put tests that focus on an area or a specific function into a single C source file. The source file should be named 'unitNNNN.c' where NNNN is a number that starts with 1300 and you can pick the next free number. +Add your test to tests/unit/Makefile.inc (if it is a unit test). +Add your test data to tests/data/Makefile.inc + You also need a separate file called tests/data/testNNNN (using the same number) that describes your test case. See the test1300 file for inspiration and the tests/FILEFORMAT documentation. @@ -46,9 +49,10 @@ For the actual C file, here's a very simple example: #include "a libcurl header.h" /* from the lib dir */ -static void unit_setup( void ) +static CURLcode unit_setup( void ) { /* whatever you want done first */ + return CURLE_OK; } static void unit_stop( void ) -- cgit v1.2.3