hostap/wpa_supplicant/dbus
Jouni Malinen 7bdd8981f7 Check os_snprintf() result more consistently - automatic 2
This converts os_snprintf() result validation cases to use
os_snprintf_error() where the comparison was 'res > size' instead of
'res >= size'. 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 \| 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 dbus: Clean dbus build files on wpa_supplicant 'make clean' 2009-12-20 20:29:09 +02:00
dbus-wpa_supplicant.conf Move D-Bus related files into their own subdirectory 2009-12-20 20:11:14 +02:00
dbus_common.c Remove leftover timeouts on cleanup 2014-05-12 19:43:59 +03:00
dbus_common.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_common_i.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_dict_helpers.c Check os_snprintf() result more consistently - automatic 2 2014-12-08 11:42:07 +02:00
dbus_dict_helpers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_new.c dbus: Redirect P2P request to the managment device if present 2014-10-27 17:15:09 +02:00
dbus_new.h dbus: add BSS Age property to indicate last-seen time 2014-09-07 19:18:45 +03:00
dbus_new_handlers.c Check os_snprintf() result more consistently - maximum length 2014-12-08 11:42:07 +02:00
dbus_new_handlers.h dbus: Add an interface configuration entry to set the WPS methods 2014-10-04 18:29:33 +03:00
dbus_new_handlers_p2p.c dbus: Redirect P2P request to the managment device if present 2014-10-27 17:15:09 +02:00
dbus_new_handlers_p2p.h dbus: Add a global property to set or unset WFD IEs 2014-09-28 20:47:06 +03:00
dbus_new_handlers_wps.c dbus: Add an interface configuration entry to set the WPS methods 2014-10-04 18:29:33 +03:00
dbus_new_helpers.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
dbus_new_helpers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_new_introspect.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old.c Fix build with CONFIG_NO_CONFIG_BLOBS 2013-03-16 12:20:21 +02:00
dbus_old.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old_handlers.c Check os_snprintf() result more consistently - maximum length 2014-12-08 11:42:07 +02:00
dbus_old_handlers.h Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
dbus_old_handlers_wps.c Update license notification in D-Bus interface files 2012-07-02 12:04:38 +03:00
fi.epitest.hostap.WPASupplicant.service.in wpa_supplicant: Edit BINDIR in dbus and systemd service files 2011-07-15 12:25:02 +03:00
fi.w1.wpa_supplicant1.service.in wpa_supplicant: Edit BINDIR in dbus and systemd service files 2011-07-15 12:25:02 +03:00
Makefile Add CONFIG_CODE_COVERAGE=y option for gcov 2013-11-24 19:16:12 +02:00