[PATCH] lib/util/util.c: move null-check before use
Aurélien Aptel
aaptel at suse.com
Thu Feb 25 16:06:41 UTC 2016
Hi,
This patch moves the null pointer check *before* the pointer is used in
the strlen() call.
- still allocate the `fname` array on the stack
- still compiles under C90 definition/code mixing rules
Please review&push
Thanks!
--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
Nürnberg)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-lib-util-util.c-move-null-check-before-use.patch
Type: text/x-patch
Size: 1049 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160225/d42bc10a/0004-lib-util-util.c-move-null-check-before-use.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20160225/d42bc10a/attachment.sig>
More information about the samba-technical
mailing list