fragattacks/src/p2p
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
p2p_build.c Use P2P_IE_VENDOR_TYPE more consistently 2014-03-05 23:36:54 +02:00
p2p_dev_disc.c P2P: Fix SD and DevDisc to limit maximum wait time per driver support 2014-06-12 10:49:19 +03:00
p2p_go_neg.c P2P: Clean up p2p_go_neg_failed() calls 2014-10-29 13:04:09 +02:00
p2p_group.c Add generic mechanism for adding vendor elements into frames 2014-07-07 12:25:09 +03:00
p2p_i.h P2P: Split p2p_channels_union() into two functions 2014-12-06 12:16:32 +02:00
p2p_invitation.c P2P: Reinvite with social operation channel if no common channels 2014-11-27 17:55:54 +02:00
p2p_parse.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
p2p_pd.c Add generic mechanism for adding vendor elements into frames 2014-07-07 12:25:09 +03:00
p2p_sd.c P2P: Limit number of SD retries during find 2014-10-23 21:51:48 +03:00
p2p_utils.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
p2p.c Check os_snprintf() result more consistently - automatic 1 2014-12-08 11:42:07 +02:00
p2p.h P2P: Document p2p_in_progress() return value 2 2014-10-31 00:50:01 +02:00