fragattacks/src/wps
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
..
http_client.c WPS: Do not use void* in arithmetic 2013-05-04 20:19:45 +03:00
http_client.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
http_server.c WPS: Print setsockopt() failure in debug log 2014-04-28 16:54:09 +03:00
http_server.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
http.h WPS: Move POST URL validation into web_connection_parse_post() 2009-12-12 16:48:50 +02:00
httpread.c WPS: Clean up indentation level (CID 68109) 2014-06-12 19:45:31 +03:00
httpread.h Remove the GPL notification from files contributed by Atheros 2012-02-11 19:39:36 +02:00
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00
ndef.c Make code path easier for static analyzers 2014-03-02 17:15:11 +02:00
upnp_xml.c WPS ER: Fix UPnP XML Device Description parser to find correct device 2011-08-31 13:56:03 +03:00
upnp_xml.h WPS ER: Fix UPnP XML Device Description parser to find correct device 2011-08-31 13:56:03 +03:00
wps_attr_build.c WPS: Enable WSC 2.0 support unconditionally 2014-03-25 18:33:21 +02:00
wps_attr_parse.c WPS: Parse Registrar Configuration Methods 2014-03-05 23:26:16 +02:00
wps_attr_parse.h WPS: Parse Registrar Configuration Methods 2014-03-05 23:26:16 +02:00
wps_attr_process.c WPS: Use os_memcmp_const() for hash/password comparisons 2014-07-02 12:38:47 +03:00
wps_common.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
wps_defs.h WPS: Add missing device types 2014-10-26 01:24:08 +03:00
wps_dev_attr.c P2P NFC: Add WPS attribute building for P2P NFC 2014-01-27 21:10:55 +02:00
wps_dev_attr.h P2P NFC: Add WPS attribute building for P2P NFC 2014-01-27 21:10:55 +02:00
wps_enrollee.c WPS: Extend internal entropy pool help for key/snonce derivation 2014-09-08 12:54:18 +03:00
wps_er_ssdp.c WPS ER: Allow UPnP interface to be forced 2013-04-28 21:56:24 +03:00
wps_er.c WPS ER: Fix UDN parser to handle missing field 2014-06-07 17:35:22 +03:00
wps_er.h WPS ER: Allow UPnP interface to be forced 2013-04-28 21:56:24 +03:00
wps_i.h WPS: Extend per-station PSK to support ER case as well 2014-03-13 18:22:25 +02:00
wps_module_tests.c tests: Add module tests for WPS attribute parsing 2014-02-21 13:41:30 +02:00
wps_registrar.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
wps_upnp_ap.c WPS: Enable WSC 2.0 support unconditionally 2014-03-25 18:33:21 +02:00
wps_upnp_event.c WPS UPnP: Add more priority for queuing EAP events 2010-10-17 21:30:25 +03:00
wps_upnp_i.h WPS: Remove unused send_wpabuf() 2013-12-29 10:00:33 +02:00
wps_upnp_ssdp.c WPS UPnP: Check os_get_random() result more consistently 2014-10-11 19:08:30 +03:00
wps_upnp_web.c Make dl_list_first() and dl_list_last() uses easier for static analyzers 2014-04-29 12:52:10 +03:00
wps_upnp.c WPS UPnP: Check os_get_random() result 2014-10-11 18:58:17 +03:00
wps_upnp.h WPS: Change concurrent radio AP to use only one WPS UPnP instance 2010-11-11 14:50:13 +02:00
wps_validate.c WPS-STRICT: Update valid Device Password ID and Config Error range 2014-01-27 21:44:31 +02:00
wps.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
wps.h WPS: Indicate current AP settings in M7 in unconfigurated state 2014-02-07 19:33:19 +02:00