]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add fix uninit value in test
authorBastian Dehn <hhaalo@arcor.de>
Wed, 13 Mar 2024 14:58:35 +0000 (15:58 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 13 Mar 2024 14:58:35 +0000 (15:58 +0100)
tests/kds_s2000w_net_read_tests.c

index c1e862dcd33882525042f7c9ffa45ca8cd8eee4d..181c652642074cc47e5c225f26a44160d01ca943 100644 (file)
@@ -62,16 +62,15 @@ END_TEST
 START_TEST(sane_kds_s2000w_net_read_test)
 {
        handler* h = init_handler();
-       h->read_info->cancel = 0;
-       h->read_info->read_size = 0;
-       h->current_metadata->format = 0;
        h->pnm_image->size = 65539;
        h->pnm_image->data = malloc(sizeof(char) * 65539);
        char* imagedata = (char*) h->pnm_image->data;
        for (int i = 0; i < 3; i++) {
                imagedata[i] = 0x0a;
        }
-       imagedata[3] = 0xff;
+       for (int i = 3; i < 65539; i++) {
+               imagedata[i] = 0xff;
+       }
 
        SANE_Int maxlen = 65536;
        char* dataptr = malloc(sizeof(char) * maxlen);