SMB_MALLOC without NULL check
Jeremy Allison
jra at samba.org
Thu Sep 9 15:13:41 MDT 2010
On Tue, Sep 07, 2010 at 11:24:05AM +0200, Andreas Moroder wrote:
> Hello,
>
> in samba 3 ( I started with git yesterday so I don't know what branch
> this is ) I found this SMB_MALLOCs where the result is not checked
> against NULL.
>
> lib/util_str.c
> function string_append SMB_MALLOC without NULL check
>
>
> lib/util_unistr.c
> load_case_tables line 126
> low_case_table allocated and not checked for NULL
>
>
> libads/sasl.c line 989
> function ads_sasl_gssapi_do_bind
>
> output_token.value = SMB_MALLOC(output_token.length);
> p = (uint8 *)output_token.value;
>
>
> libnet/libnet_samsync_ldif.c
> function populate_ldap_for_ldif in line 85
>
> There are also 3 SMB_MALLOC without check in libsmb/cliconnect.c at line
> 2136 but I am not sure if a check is necessary.
Thanks a lot Andreas, I'm fixing these for 3.6.0.
Jeremy.
More information about the samba-technical
mailing list