hostap/src/tls
Jouni Malinen d85e1fc8a5 Check os_snprintf() result more consistently - automatic 1
This converts os_snprintf() result validation cases to use
os_snprintf_error() where the exact rule used in os_snprintf_error() was
used. These changes were done automatically with spatch using the
following semantic patch:

@@
identifier E1;
expression E2,E3,E4,E5,E6;
statement S1;
@@

(
  E1 = os_snprintf(E2, E3, ...);
|
  int E1 = os_snprintf(E2, E3, ...);
|
  if (E5)
	E1 = os_snprintf(E2, E3, ...);
  else
	E1 = os_snprintf(E2, E3, ...);
|
  if (E5)
	E1 = os_snprintf(E2, E3, ...);
  else if (E6)
	E1 = os_snprintf(E2, E3, ...);
  else
	E1 = 0;
|
  if (E5) {
	...
	E1 = os_snprintf(E2, E3, ...);
  } else {
	...
	return -1;
  }
|
  if (E5) {
	...
	E1 = os_snprintf(E2, E3, ...);
  } else if (E6) {
	...
	E1 = os_snprintf(E2, E3, ...);
  } else {
	...
	return -1;
  }
|
  if (E5) {
	...
	E1 = os_snprintf(E2, E3, ...);
  } else {
	...
	E1 = os_snprintf(E2, E3, ...);
  }
)
? os_free(E4);
- if (E1 < 0 || \( E1 >= E3 \| (size_t) E1 >= E3 \| (unsigned int) E1 >= E3 \| E1 >= (int) E3 \))
+ if (os_snprintf_error(E3, E1))
(
  S1
|
{ ... }
)

Signed-off-by: Jouni Malinen <j@w1.fi>
2014-12-08 11:42:07 +02:00
..
.gitignore Add rules for building src/tls/libtls.a and use it with eap_example 2009-12-06 16:27:54 +02:00
asn1.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
asn1.h RSA: Add OID definitions and helper function for hash algorithms 2014-05-19 23:27:30 +03:00
bignum.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
bignum.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
libtommath.c libtommath: Avoid a compiler warning on unused variable 2013-03-16 12:03:37 +02:00
Makefile Include TLS v1.1 and v1.2 support in library build 2011-11-27 22:08:29 +02:00
pkcs1.c TLS: Use os_memcmp_const() for hash/password comparisons 2014-07-02 12:38:47 +03:00
pkcs1.h PKCS 1: Add function for checking v1.5 RSA signature 2014-05-20 19:52:18 +03:00
pkcs5.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
pkcs5.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
pkcs8.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
pkcs8.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
rsa.c Add function for building RSA public key from n and e parameters 2014-05-19 23:27:30 +03:00
rsa.h Add function for building RSA public key from n and e parameters 2014-05-19 23:27:30 +03:00
tlsv1_client.c TLS: Add support for DHE-RSA cipher suites 2014-03-09 15:43:50 +02:00
tlsv1_client.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
tlsv1_client_i.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
tlsv1_client_read.c TLS client: Check DH parameters using a local variable 2014-11-23 17:48:34 +02:00
tlsv1_client_write.c TLS: Add support for DHE-RSA cipher suites 2014-03-09 15:43:50 +02:00
tlsv1_common.c TLS: Use os_memcmp_const() for hash/password comparisons 2014-07-02 12:38:47 +03:00
tlsv1_common.h TLS: Share a helper function for verifying Signature 2014-03-09 17:11:58 +02:00
tlsv1_cred.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
tlsv1_cred.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
tlsv1_record.c TLS: Use os_memcmp_const() for hash/password comparisons 2014-07-02 12:38:47 +03:00
tlsv1_record.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
tlsv1_server.c TLS testing: Add new test cases for RSA-DHE primes 2014-03-16 12:43:49 +02:00
tlsv1_server.h TLS testing: Allow hostapd to be used as a TLS testing tool 2014-03-09 18:47:09 +02:00
tlsv1_server_i.h TLS testing: Add new test cases for RSA-DHE primes 2014-03-16 12:43:49 +02:00
tlsv1_server_read.c TLS: Reorder length bounds checking to avoid static analyzer warning 2014-12-06 18:36:02 +02:00
tlsv1_server_write.c TLS testing: Add new test cases for RSA-DHE primes 2014-03-16 12:43:49 +02:00
x509v3.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
x509v3.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00