summaryrefslogtreecommitdiffstats
path: root/libfreerdp/codec/test/TestFuzzCodecs.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:37 +0000
commit3c206f96fd1e102a13b2971778060fef4be7afbc (patch)
tree26d54f12b25a491844130c7934c60d97c85807b7 /libfreerdp/codec/test/TestFuzzCodecs.c
parentReleasing progress-linux version 3.5.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-3c206f96fd1e102a13b2971778060fef4be7afbc.tar.xz
freerdp3-3c206f96fd1e102a13b2971778060fef4be7afbc.zip
Merging upstream version 3.5.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libfreerdp/codec/test/TestFuzzCodecs.c')
-rw-r--r--libfreerdp/codec/test/TestFuzzCodecs.c31
1 files changed, 9 insertions, 22 deletions
diff --git a/libfreerdp/codec/test/TestFuzzCodecs.c b/libfreerdp/codec/test/TestFuzzCodecs.c
index d83d8d4..f923765 100644
--- a/libfreerdp/codec/test/TestFuzzCodecs.c
+++ b/libfreerdp/codec/test/TestFuzzCodecs.c
@@ -453,28 +453,15 @@ int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
if (Size < 4)
return 0;
- int i = 0;
- winpr_RAND(&i, sizeof(i));
- i = i % 18;
-
- if (i < 2)
- TestFreeRDPCodecClear(Data, Size);
- else if (i < 4)
- TestFreeRDPCodecXCrush(Data, Size);
- else if (i < 6)
- TestFreeRDPCodecZGfx(Data, Size);
- else if (i < 8)
- TestFreeRDPCodecNCrush(Data, Size);
- else if (i < 10)
- TestFreeRDPCodecRemoteFX(Data, Size);
- else if (i < 12)
- TestFreeRDPCodecMppc(Data, Size);
- else if (i < 14)
- TestFreeRDPCodecProgressive(Data, Size);
- else if (i < 16)
- TestFreeRDPCodecInterleaved(Data, Size);
- else if (i < 18)
- TestFreeRDPCodecPlanar(Data, Size);
+ TestFreeRDPCodecClear(Data, Size);
+ TestFreeRDPCodecXCrush(Data, Size);
+ TestFreeRDPCodecZGfx(Data, Size);
+ TestFreeRDPCodecNCrush(Data, Size);
+ TestFreeRDPCodecRemoteFX(Data, Size);
+ TestFreeRDPCodecMppc(Data, Size);
+ TestFreeRDPCodecProgressive(Data, Size);
+ TestFreeRDPCodecInterleaved(Data, Size);
+ TestFreeRDPCodecPlanar(Data, Size);
return 0;
}