← Commit list

ebe8c14d3

Denys Vlasenko
Denys Vlasenko
2021-06-15
SUCCESS Duration: 152s

Subject

udhcpc: do not use inet_addr() to parse -r REQ_IP, it's deprecated

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/udhcp/dhcpc.c+2 -1
@@ -1284,7 +1284,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv)
memcpy(p + OPT_DATA + 3, str_F, len); /* do not store NUL byte */
}
if (opt & OPT_r)
- requested_ip = inet_addr(str_r);
+ if (!inet_aton(str_r, (void*)&requested_ip))
+ bb_show_usage();
#if ENABLE_FEATURE_UDHCP_PORT
if (opt & OPT_P) {
CLIENT_PORT = xatou16(str_P);