diff options
author | Jeremy Allison <jra@samba.org> | 2005-05-16 22:54:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:56:55 -0500 |
commit | 6019df0858aa33e81167eeeade7f7264cd719cef (patch) | |
tree | 77cd290a0be062f52806fc906689912f198f43c2 /source3/utils | |
parent | b5c736d0f0131a66629ebb35ce713c0d79a41fd5 (diff) | |
download | samba-6019df0858aa33e81167eeeade7f7264cd719cef.tar.gz samba-6019df0858aa33e81167eeeade7f7264cd719cef.tar.bz2 samba-6019df0858aa33e81167eeeade7f7264cd719cef.zip |
r6834: Fix bug #2703, found by John Antonishek <ant@nist.gov>. Add NULL
guard for disp_fields[0].
Jeremy.
(This used to be commit ee45f4b17e4131a9e0779046c49b24d1e35256d8)
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_ads.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 34a357cd46..03fbb29f5b 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -250,12 +250,14 @@ static BOOL usergrp_display(char *field, void **values, void *data_area) char **disp_fields = (char **) data_area; if (!field) { /* must be end of record */ - if (!strchr_m(disp_fields[0], '$')) { - if (disp_fields[1]) - d_printf("%-21.21s %s\n", - disp_fields[0], disp_fields[1]); - else - d_printf("%s\n", disp_fields[0]); + if (disp_fields[0]) { + if (!strchr_m(disp_fields[0], '$')) { + if (disp_fields[1]) + d_printf("%-21.21s %s\n", + disp_fields[0], disp_fields[1]); + else + d_printf("%s\n", disp_fields[0]); + } } SAFE_FREE(disp_fields[0]); SAFE_FREE(disp_fields[1]); |