Commit b329cc24 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Check return code properly in fputs (< 0 is error).

parent ed31fe68
Loading
Loading
Loading
Loading
+1 −1
Changes for fips-1.0/hmac/fips_hmactest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ int hmac_test(const EVP_MD *md, FILE *out, FILE *in)
		/* If no = or starts with [ (for [L=20] line) just copy */
		if (!p)
			{
			if (!fputs(olinebuf, out))
			if (fputs(olinebuf, out) < 0)
				goto error;
			continue;
			}
+2 −2
Changes for fips-1.0/rsa/fips_rsagtest.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ int main(int argc, char **argv)

	if (!rsa_test(out, in))
		{
		fprintf(stderr, "FATAL RSAVTEST file processing error\n");
		fprintf(stderr, "FATAL RSAGTEST file processing error\n");
		goto end;
		}
	else
@@ -174,7 +174,7 @@ int rsa_test(FILE *out, FILE *in)
		/* If no = or starts with [ (for [foo = bar] line) just copy */
		if (!p || *keyword=='[')
			{
			if (!fputs(olinebuf, out))
			if (fputs(olinebuf, out) < 0)
				goto error;
			continue;
			}
+2 −2
Changes for fips-1.0/rsa/fips_rsastest.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ int main(int argc, char **argv)

	if (!rsa_stest(out, in, Saltlen))
		{
		fprintf(stderr, "FATAL RSAVTEST file processing error\n");
		fprintf(stderr, "FATAL RSASTEST file processing error\n");
		goto end;
		}
	else
@@ -190,7 +190,7 @@ int rsa_stest(FILE *out, FILE *in, int Saltlen)
		/* If no = just copy */
		if (!p)
			{
			if (!fputs(olinebuf, out))
			if (fputs(olinebuf, out) < 0)
				goto error;
			continue;
			}
+1 −1
Changes for fips-1.0/rsa/fips_rsavtest.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ int rsa_test(FILE *out, FILE *in, int Saltlen)
		/* If no = or starts with [ (for [foo = bar] line) just copy */
		if (!p || *keyword=='[')
			{
			if (!fputs(olinebuf, out))
			if (fputs(olinebuf, out) < 0)
				goto error;
			continue;
			}