fragattacks/src/rsn_supp
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
..
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00
peerkey.c Suite B: Select EAPOL-Key integrity and key-wrap algorithms based on AKM 2014-11-16 17:09:11 +02:00
peerkey.h PeerKey: Clean up EAPOL-Key Key Data processing 2014-07-02 12:38:46 +03:00
pmksa_cache.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
pmksa_cache.h Suite B: PMKID derivation for AKM 00-0F-AC:11 2014-11-16 17:09:11 +02:00
preauth.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
preauth.h Remove CONFIG_NO_WPA2 build parameter 2013-06-07 20:13:25 +03:00
tdls.c TDLS: Use WMM IE for propagating peer WMM capability 2014-10-03 11:52:56 +03:00
wpa_ft.c AES: Extend key wrap design to support longer AES keys 2014-10-07 14:57:06 +03:00
wpa_i.h Add support for offloading key management operations to the driver 2014-10-23 18:38:50 +03:00
wpa_ie.c Suite B: Add AKM 00-0F-AC:11 2014-11-16 13:20:51 +02:00
wpa_ie.h TDLS: Use QoS info from WMM IE obtained in TDLS frames 2014-03-12 22:39:11 +02:00
wpa.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
wpa.h Add support for offloading key management operations to the driver 2014-10-23 18:38:50 +03:00