mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-30 03:08:24 -05:00
d85e1fc8a5
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> |
||
---|---|---|
.. | ||
http_client.c | ||
http_client.h | ||
http_server.c | ||
http_server.h | ||
http.h | ||
httpread.c | ||
httpread.h | ||
Makefile | ||
ndef.c | ||
upnp_xml.c | ||
upnp_xml.h | ||
wps_attr_build.c | ||
wps_attr_parse.c | ||
wps_attr_parse.h | ||
wps_attr_process.c | ||
wps_common.c | ||
wps_defs.h | ||
wps_dev_attr.c | ||
wps_dev_attr.h | ||
wps_enrollee.c | ||
wps_er_ssdp.c | ||
wps_er.c | ||
wps_er.h | ||
wps_i.h | ||
wps_module_tests.c | ||
wps_registrar.c | ||
wps_upnp_ap.c | ||
wps_upnp_event.c | ||
wps_upnp_i.h | ||
wps_upnp_ssdp.c | ||
wps_upnp_web.c | ||
wps_upnp.c | ||
wps_upnp.h | ||
wps_validate.c | ||
wps.c | ||
wps.h |