mirror of https://github.com/google/oss-fuzz.git
[Kafka]: Fix issue 51986 51996 (#8641)
Fix two issues for kafka fuzzing 51986 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51986) 51996 (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51996)
This commit is contained in:
parent
43c4d9a53a
commit
296b7b1b29
|
@ -26,7 +26,7 @@ def TestInput(data):
|
|||
|
||||
try:
|
||||
c = Consumer({
|
||||
'group.id': fdp.ConsumeString(10),
|
||||
'group.id': fdp.ConsumeConsumeUnicodeNoSurrogates(10),
|
||||
'socket.timeout.ms': fdp.ConsumeIntInRange(10,2000),
|
||||
'session.timeout.ms': fdp.ConsumeIntInRange(10,2000),
|
||||
'on_commit': dummy_callback})
|
||||
|
@ -36,7 +36,7 @@ def TestInput(data):
|
|||
|
||||
try:
|
||||
c.subscribe(
|
||||
[fdp.ConsumeString(10)],
|
||||
[fdp.ConsumeUnicodeNoSurrogates(10)],
|
||||
on_assign=dummy_callback,
|
||||
on_revoke=dummy_callback
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ def TestInput(data):
|
|||
|
||||
partitions = list(
|
||||
map(
|
||||
lambda part: TopicPartition(fdp.ConsumeString(10).replace('\x00', ''), part),
|
||||
lambda part: TopicPartition(fdp.ConsumeUnicodeNoSurrogates(10).replace('\x00', ''), part),
|
||||
range(0, 100, 3)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -26,9 +26,9 @@ def TestInput(data):
|
|||
'message.timeout.ms': fdp.ConsumeIntInRange(10,2000)
|
||||
})
|
||||
|
||||
p.produce(fdp.ConsumeString(20).replace('\x00', ''))
|
||||
p.produce(fdp.ConsumeUnicodeNoSurrogates(20).replace('\x00', ''))
|
||||
p.produce(
|
||||
fdp.ConsumeString(20).replace('\x00', ''),
|
||||
fdp.ConsumeUnicodeNoSurrogates(20).replace('\x00', ''),
|
||||
value=fdp.ConsumeString(20),
|
||||
key=fdp.ConsumeString(20)
|
||||
)
|
||||
|
@ -37,8 +37,8 @@ def TestInput(data):
|
|||
pass
|
||||
|
||||
p.produce(
|
||||
topic=fdp.ConsumeString(20),
|
||||
value=fdp.ConsumeString(20),
|
||||
topic=fdp.ConsumeUnicodeNoSurrogates(20),
|
||||
value=fdp.ConsumeUnicodeNoSurrogates(20),
|
||||
partition=fdp.ConsumeIntInRange(1,10),
|
||||
callback=on_delivery
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue