summaryrefslogtreecommitdiff
path: root/test/pixmaps/invalid
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-03 17:23:58 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-12 15:47:43 -0800
commitf7fbbb92f6d383b21dd1587c3703a5de37c625b5 (patch)
tree9fd6b854395cfb082b24a4e0145c317b3bcad6a2 /test/pixmaps/invalid
parenta3a7c6dcc3b629d765014816c566c63165c63ca8 (diff)
test: add test cases for CVE-2022-44617 (zero-width w/enormous height)
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'test/pixmaps/invalid')
-rw-r--r--test/pixmaps/invalid/zero-width-v1.xpm37
-rw-r--r--test/pixmaps/invalid/zero-width.xpm35
2 files changed, 72 insertions, 0 deletions
diff --git a/test/pixmaps/invalid/zero-width-v1.xpm b/test/pixmaps/invalid/zero-width-v1.xpm
new file mode 100644
index 0000000..9b403ca
--- /dev/null
+++ b/test/pixmaps/invalid/zero-width-v1.xpm
@@ -0,0 +1,37 @@
+#define PLAID_format 1
+#define PLAID_width 0
+#define PLAID_height 4294967293
+#define PLAID_ncolors 4
+#define PLAID_chars_per_pixel 2
+
+static char *PLAID_colors[] = {
+" ", "red",
+"Y ", "green",
+"+ ", "yellow",
+"x ", "black"
+};
+
+static char *PLAID_pixels[] = {
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+"Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+"x x x x x x x x x x x x x x x x x x x x x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x "
+};
diff --git a/test/pixmaps/invalid/zero-width.xpm b/test/pixmaps/invalid/zero-width.xpm
new file mode 100644
index 0000000..78f367b
--- /dev/null
+++ b/test/pixmaps/invalid/zero-width.xpm
@@ -0,0 +1,35 @@
+/* XPM */
+static char * plaid[] = {
+/* plaid pixmap
+ * width height ncolors chars_per_pixel */
+"0 4294967293 4 2 ", /*cxpm hang*/
+/*"41474 31474 4 2 ",*/ /*ego ctrl all memory*/
+/* colors */
+" c red m white s light_color ",
+"Y c green m black s lines_in_mix ",
+"+ c yellow m white s lines_in_dark ",
+"x m black s dark_color ",
+/* pixels */
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+"Y Y Y Y Y x Y Y Y Y Y + x + x + x + x + x + ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x x x x x x x x x x x x x ",
+"x x x x x x x x x x x x + x x x x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+"x x x x x x x x x x x x x x x x x x x x x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x ",
+" x x x Y x x ",
+" x x x x Y x x x "
+} ;