← Commit list

a97777889

Denys Vlasenko
Denys Vlasenko
2015-02-03
SUCCESS Duration: 153s

Subject

ifconfig: fix double free fatal error in INET_sprint

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/interface.c+2 -2
@@ -91,9 +91,9 @@ static const char* FAST_FUNC INET_sprint(struct sockaddr *sap, int numeric)
{
static char *buff; /* defaults to NULL */
- free(buff);
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return "[NONE SET]";
+ free(buff);
buff = INET_rresolve((struct sockaddr_in *) sap, numeric, 0xffffff00);
return buff;
}
@@ -173,9 +173,9 @@ static const char* FAST_FUNC INET6_sprint(struct sockaddr *sap, int numeric)
{
static char *buff;
- free(buff);
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
return "[NONE SET]";
+ free(buff);
buff = INET6_rresolve((struct sockaddr_in6 *) sap, numeric);
return buff;
}