mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-09 14:25:35 +00:00
Removing space before opening parenthesis
This commit is contained in:
parent
b3d3127d01
commit
a82fdd4763
|
@ -26,10 +26,10 @@ int dummy_send( void *ctx, const unsigned char *buf, size_t len )
|
||||||
(void) buf;
|
(void) buf;
|
||||||
|
|
||||||
//pretends we wrote everything ok
|
//pretends we wrote everything ok
|
||||||
if ( len > INT_MAX ) {
|
if( len > INT_MAX ) {
|
||||||
return ( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
return ( (int) len );
|
return( (int) len );
|
||||||
}
|
}
|
||||||
|
|
||||||
int fuzz_recv( void *ctx, unsigned char *buf, size_t len )
|
int fuzz_recv( void *ctx, unsigned char *buf, size_t len )
|
||||||
|
@ -37,20 +37,20 @@ int fuzz_recv( void *ctx, unsigned char *buf, size_t len )
|
||||||
//reads from the buffer from fuzzer
|
//reads from the buffer from fuzzer
|
||||||
fuzzBufferOffset_t * biomemfuzz = (fuzzBufferOffset_t *) ctx;
|
fuzzBufferOffset_t * biomemfuzz = (fuzzBufferOffset_t *) ctx;
|
||||||
|
|
||||||
if (biomemfuzz->Offset == biomemfuzz->Size) {
|
if(biomemfuzz->Offset == biomemfuzz->Size) {
|
||||||
//EOF
|
//EOF
|
||||||
return ( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
if ( len > INT_MAX ) {
|
if( len > INT_MAX ) {
|
||||||
return ( -1 );
|
return( -1 );
|
||||||
}
|
}
|
||||||
if ( len + biomemfuzz->Offset > biomemfuzz->Size ) {
|
if( len + biomemfuzz->Offset > biomemfuzz->Size ) {
|
||||||
//do not overflow
|
//do not overflow
|
||||||
len = biomemfuzz->Size - biomemfuzz->Offset;
|
len = biomemfuzz->Size - biomemfuzz->Offset;
|
||||||
}
|
}
|
||||||
memcpy(buf, biomemfuzz->Data + biomemfuzz->Offset, len);
|
memcpy(buf, biomemfuzz->Data + biomemfuzz->Offset, len);
|
||||||
biomemfuzz->Offset += len;
|
biomemfuzz->Offset += len;
|
||||||
return ( (int) len );
|
return( (int) len );
|
||||||
}
|
}
|
||||||
|
|
||||||
int dummy_random( void *p_rng, unsigned char *output, size_t output_len )
|
int dummy_random( void *p_rng, unsigned char *output, size_t output_len )
|
||||||
|
|
Loading…
Reference in a new issue