Go to file
Frediano Ziglio d589542e04 test-quic: Add test cases for quic fuzzer
To use for start for the fuzzer.

Tests have been generated with a patch like:

	diff --git a/tests/test-quic.c b/tests/test-quic.c
	--- a/tests/test-quic.c
	+++ b/tests/test-quic.c
	@@ -372,8 +372,8 @@ static void pixbuf_compare(GdkPixbuf *pixbuf_a, GdkPixbuf *pixbuf_b)
	 static GdkPixbuf *pixbuf_new_random(int alpha)
	 {
	     gboolean has_alpha = alpha >= 0 ? alpha : g_random_boolean();
	-    gint width = g_random_int_range(100, 2000);
	-    gint height = g_random_int_range(100, 500);
	+    gint width = g_random_int_range(10, 100);
	+    gint height = g_random_int_range(10, 100);
	     GdkPixbuf *random_pixbuf;
	     guint i, size;
	     guint8 *pixels;
	@@ -401,6 +401,12 @@ static void test_pixbuf(GdkPixbuf *pixbuf)
	     compressed_data = quic_encode_from_pixbuf(pixbuf, imgbuf);

	     uncompressed_pixbuf = quic_decode_to_pixbuf(compressed_data);
	+    {
	+        static int num = 0;
	+        char fn[256];
	+        sprintf(fn, "test%d.quic", ++num);
	+        g_assert(g_file_set_contents(fn, (void *) compressed_data->data, compressed_data->len, NULL));
	+    }
	     image_buf_free(imgbuf, uncompressed_pixbuf);

	     //g_assert(memcmp(gdk_pixbuf_get_pixels(pixbuf), gdk_pixbuf_get_pixels(uncompressed_pixbuf), gdk_pixbuf_get_byte_length(uncompressed_pixbuf)));

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com>
2020-09-17 06:46:57 +01:00
common quic: Avoid possible buffer overflow in find_bucket 2020-09-17 06:46:57 +01:00
docs proto: Allows to specify @deprecated option for flags and enums 2020-04-07 10:22:33 +01:00
m4 build: Remove dependencies to libgthread 2020-04-29 15:27:20 +01:00
python_modules marshal: fix clang "missing field initializer" warning on generated files 2020-07-11 08:17:20 +01:00
tests test-quic: Add test cases for quic fuzzer 2020-09-17 06:46:57 +01:00
.gitlab-ci.yml ci: Use spice-protocol master for make-win job 2020-03-22 10:32:22 +00:00
.gitmodules Integrate recorder library 2019-01-23 14:44:19 +00:00
.gitpublish Add a .gitpublish 2019-01-15 17:35:51 +04:00
autogen.sh Remove files moved to spice-protocol 2015-08-11 10:26:06 +02:00
configure.ac Add helper code for agent messages 2020-04-24 09:42:46 +01:00
COPYING Remove trailing whitespace 2015-12-18 11:41:15 +01:00
git.mk build: Update git.mk to latest version 2018-06-18 14:08:03 +01:00
Makefile.am configure.ac: add --enable-tests 2019-11-18 11:07:56 +00:00
meson_options.txt build: Allows to request a greater SPICE protocol version 2020-04-08 14:28:40 +01:00
meson.build build: Remove -Werror from Meson build 2020-07-03 10:42:14 +01:00
spice_codegen.py codegen: Exit with error on error generating C structures 2019-08-13 18:11:04 +01:00
spice.proto proto: Add support for side mouse buttons 2020-08-31 12:33:11 +01:00