src/test/SDL_test_fuzzer.c
changeset 6719 c250f633c040
parent 6711 e6355923901d
child 6756 398073b195bb
     1.1 --- a/src/test/SDL_test_fuzzer.c	Sat Dec 01 14:48:30 2012 -0800
     1.2 +++ b/src/test/SDL_test_fuzzer.c	Sat Dec 01 23:30:53 2012 -0800
     1.3 @@ -263,7 +263,7 @@
     1.4  	size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
     1.5  				(Uint64) boundary1, (Uint64) boundary2,
     1.6  				validDomain, buffer);
     1.7 -	if (size == 0) {
     1.8 +	if (buffer == NULL || size == 0) {
     1.9  		return 0;
    1.10  	}
    1.11  
    1.12 @@ -291,7 +291,7 @@
    1.13  	size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
    1.14  				(Uint64) boundary1, (Uint64) boundary2,
    1.15  				validDomain, buffer);
    1.16 -	if(size == 0) {
    1.17 +	if (buffer == NULL || size == 0) {
    1.18  		return 0;
    1.19  	}
    1.20  
    1.21 @@ -319,7 +319,7 @@
    1.22  	size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
    1.23  				(Uint64) boundary1, (Uint64) boundary2,
    1.24  				validDomain, buffer);
    1.25 -	if(size == 0) {
    1.26 +	if (buffer == NULL || size == 0) {
    1.27  		return 0;
    1.28  	}
    1.29  
    1.30 @@ -347,7 +347,7 @@
    1.31  	size = SDLTest_GenerateUnsignedBoundaryValues(maxValue,
    1.32  				(Uint64) boundary1, (Uint64) boundary2,
    1.33  				validDomain, buffer);
    1.34 -	if(size == 0) {
    1.35 +	if (buffer == NULL || size == 0) {
    1.36  		return 0;
    1.37  	}
    1.38  
    1.39 @@ -467,7 +467,7 @@
    1.40  	size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
    1.41  				(Sint64) boundary1, (Sint64) boundary2,
    1.42  				validDomain, buffer);
    1.43 -	if(size == 0) {
    1.44 +	if (buffer == NULL || size == 0) {
    1.45  		return CHAR_MIN;
    1.46  	}
    1.47  
    1.48 @@ -495,7 +495,7 @@
    1.49  	size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
    1.50  					(Sint64) boundary1, (Sint64) boundary2,
    1.51  					validDomain, buffer);
    1.52 -	if(size == 0) {
    1.53 +	if (buffer == NULL || size == 0) {
    1.54  		return SHRT_MIN;
    1.55  	}
    1.56  
    1.57 @@ -524,7 +524,7 @@
    1.58  	size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
    1.59  				(Sint64) boundary1, (Sint64) boundary2,
    1.60  				validDomain, buffer);
    1.61 -	if(size == 0) {
    1.62 +	if (buffer == NULL || size == 0) {
    1.63  		return INT_MIN;
    1.64  	}
    1.65  
    1.66 @@ -553,7 +553,7 @@
    1.67  	size = SDLTest_GenerateSignedBoundaryValues(minValue, maxValue,
    1.68  				(Sint64) boundary1, (Sint64) boundary2,
    1.69  				validDomain, buffer);
    1.70 -	if(size == 0) {
    1.71 +	if (buffer == NULL || size == 0) {
    1.72  		return LLONG_MIN;
    1.73  	}
    1.74