summaryrefslogtreecommitdiff
path: root/test-invalid-net-wm-icon.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-invalid-net-wm-icon.c')
-rw-r--r--test-invalid-net-wm-icon.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/test-invalid-net-wm-icon.c b/test-invalid-net-wm-icon.c
index 7ce9829..f3c926b 100644
--- a/test-invalid-net-wm-icon.c
+++ b/test-invalid-net-wm-icon.c
@@ -1,4 +1,4 @@
-/* gcc test-invalid-net-wm-icon.c -o test-invalid-net-wm-icon.exe -lX11 */
+/* gcc test-invalid-net-wm-icon.c -o test-invalid-net-wm-icon -lX11 */
#include <stdlib.h>
#include <stdio.h>
@@ -23,7 +23,7 @@ void test(unsigned int *buffer, unsigned int buffer_length)
int main(int argc, char **argv)
{
- /* Invalid _NET_WM_ICO icons */
+ /* Invalid _NET_WM_ICON icons */
d = XOpenDisplay(0);
int s = DefaultScreen(d);
net_wm_icon = XInternAtom(d, "_NET_WM_ICON", False);
@@ -40,6 +40,10 @@ int main(int argc, char **argv)
unsigned int buffer[] = {-1, -1, 0xFFFFFFFF, 0xFFFFFFFF};
test(buffer, sizeof(buffer));
+ // sizes are still just absurd
+ unsigned int buffer1[] = {0x80000001, 0x80000001, 0xFFFFFFFF, 0xFFFFFFFF};
+ test(buffer1, sizeof(buffer1));
+
// property should be 256K, but is only 64K
int propsize = 0x10000;
unsigned int *buffer2 = malloc(propsize);
@@ -51,8 +55,8 @@ int main(int argc, char **argv)
propsize = 0x100000;
unsigned int *buffer3 = malloc(propsize);
assert(buffer3);
- buffer2[0] = 0x3000;
- buffer2[1] = 0x3000;
+ buffer3[0] = 0x3000;
+ buffer3[1] = 0x3000;
test(buffer3, propsize);
while(1) XNextEvent(d, &e);