hostap/src/drivers
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 Force rebuilding of src/drivers between hostapd and wpa_supplicant 2009-08-14 20:40:37 +03:00
android_drv.h Remove obsolete license notifications 2013-12-24 22:59:52 +02:00
driver.h Replace send_ft_action() driver_op with send_action() 2014-12-06 18:13:29 +02:00
driver_atheros.c atheros: Cleanup atheros_raw_receive to process all management frames 2014-12-02 16:20:35 +02:00
driver_bsd.c bsd: Fix hostapd compiler warning 2014-02-03 19:34:49 +02:00
driver_common.c hostapd: Allow ACS to be offloaded to the driver 2014-12-03 22:31:53 +02:00
driver_hostap.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_hostap.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_macsec_qca.c Add macsec_qca driver wrapper 2014-05-09 20:42:44 +03:00
driver_ndis.c Get rid of duplicated cipher suite and AKM definitions 2013-12-31 09:16:27 +02:00
driver_ndis.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_ndis_.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
driver_nl80211.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
driver_nl80211.h nl80211: Move scanning related functionality to a separate file 2014-12-06 17:59:26 +02:00
driver_nl80211_android.c nl80211: Fix Android compilation by adding include for fcntl.h 2014-11-16 17:09:11 +02:00
driver_nl80211_capa.c nl80211: Use nl80211_drv_msg() helper 2014-12-06 17:17:12 +02:00
driver_nl80211_event.c Check os_snprintf() result more consistently - success case 2014-12-08 11:42:07 +02:00
driver_nl80211_monitor.c nl80211: Move AP monitor interface handling to a separate file 2014-10-26 17:54:56 +02:00
driver_nl80211_scan.c nl80211: Move scanning related functionality to a separate file 2014-12-06 17:59:26 +02:00
driver_none.c Remove the GPL notification from files contributed by Atheros 2012-02-11 19:39:36 +02:00
driver_openbsd.c Add driver for OpenBSD net80211 layer 2013-02-03 21:16:29 +02:00
driver_privsep.c Remove unused disassociate() driver_ops 2012-11-15 00:06:12 +02:00
driver_roboswitch.c roboswitch: Verify that register read succeeds before comparing result 2014-03-02 17:15:12 +02:00
driver_wext.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
driver_wext.h Android: Remove old WEXT extensions 2013-12-24 22:52:18 +02:00
driver_wired.c wired: Fix deinit path to unregister eloop read_sock 2014-11-17 00:57:15 +02:00
drivers.c madwifi: Remove obsolete madwifi driver interface 2014-11-01 16:15:29 +02:00
drivers.mak nl80211: Move scanning related functionality to a separate file 2014-12-06 17:59:26 +02:00
drivers.mk nl80211: Move scanning related functionality to a separate file 2014-12-06 17:59:26 +02:00
linux_defines.h nl80211: Move definitions into separate header files 2014-10-26 17:03:24 +02:00
linux_ioctl.c Verify that readlink() did not truncate result 2013-10-26 15:55:39 +03:00
linux_ioctl.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
linux_wext.h Remove the GPL notification from files contributed by Jouni Malinen 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
ndis_events.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
netlink.c netlink: Fix RTM_SETLINK padding at the end of the message 2014-10-12 19:27:16 +03:00
netlink.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
nl80211_copy.h Sync with wireless-testing.git include/uapi/linux/nl80211.h 2014-11-16 20:08:00 +02:00
priv_netlink.h netlink: Fix RTM_SETLINK padding at the end of the message 2014-10-12 19:27:16 +03:00
rfkill.c Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00
rfkill.h Remove the GPL notification from files contributed by Jouni Malinen 2012-02-11 19:39:36 +02:00