hostap/src/radius
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 build rules for src/radius/libradius.a 2009-12-24 11:59:08 +02:00
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00
radius.c RADIUS: Define new attributes from RFC 5580 2014-10-18 09:30:35 +03:00
radius.h RADIUS: Define new attributes from RFC 5580 2014-10-18 09:30:35 +03:00
radius_client.c RADIUS client: Print a clear debug log entry if socket is not available 2014-11-23 17:41:13 +02:00
radius_client.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
radius_das.c RADIUS DAS: Add support for NAS identification attributes 2014-02-20 13:55:36 +02:00
radius_das.h RADIUS DAS: Add support for NAS identification attributes 2014-02-20 13:55:36 +02:00
radius_server.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
radius_server.h ERP: Add support for ERP on EAP server and authenticator 2014-12-04 12:16:27 +02:00