lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <52B0840F.40407@redhat.com> Date: Tue, 17 Dec 2013 11:04:15 -0600 From: Eric Sandeen <sandeen@...hat.com> To: "Darrick J. Wong" <darrick.wong@...cle.com>, tytso@....edu CC: linux-ext4@...r.kernel.org Subject: Re: [PATCH 26/74] libss: fix memory handling errors On 12/10/13, 7:21 PM, Darrick J. Wong wrote: > Fix memory allocation calculations and check for NULL pointer returns. > > Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com> > --- > lib/ss/invocation.c | 5 +++++ > lib/ss/parse.c | 4 ++++ > lib/ss/request_tbl.c | 2 +- > 3 files changed, 10 insertions(+), 1 deletion(-) > > > diff --git a/lib/ss/invocation.c b/lib/ss/invocation.c > index a711050..08b66f2 100644 > --- a/lib/ss/invocation.c > +++ b/lib/ss/invocation.c > @@ -20,6 +20,7 @@ > #ifdef HAVE_DLOPEN > #include <dlfcn.h> > #endif > +#include <errno.h> > > int ss_create_invocation(subsystem_name, version_string, info_ptr, > request_table_ptr, code_ptr) > @@ -46,6 +47,10 @@ int ss_create_invocation(subsystem_name, version_string, info_ptr, > ; > table = (ss_data **) realloc((char *)table, > ((unsigned)sci_idx+2)*size); > + if (table == NULL) { > + *code_ptr = errno; > + return 0; > + } According to coverity CID 295143, this leaks "new_table" Just a free() before return would suffice I think. Thanks, -Eric -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists