7bdd8981f7
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> |
||
---|---|---|
.. | ||
.gitignore | ||
dbus-wpa_supplicant.conf | ||
dbus_common.c | ||
dbus_common.h | ||
dbus_common_i.h | ||
dbus_dict_helpers.c | ||
dbus_dict_helpers.h | ||
dbus_new.c | ||
dbus_new.h | ||
dbus_new_handlers.c | ||
dbus_new_handlers.h | ||
dbus_new_handlers_p2p.c | ||
dbus_new_handlers_p2p.h | ||
dbus_new_handlers_wps.c | ||
dbus_new_helpers.c | ||
dbus_new_helpers.h | ||
dbus_new_introspect.c | ||
dbus_old.c | ||
dbus_old.h | ||
dbus_old_handlers.c | ||
dbus_old_handlers.h | ||
dbus_old_handlers_wps.c | ||
fi.epitest.hostap.WPASupplicant.service.in | ||
fi.w1.wpa_supplicant1.service.in | ||
Makefile |