diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-03-18 11:22:52 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-03-18 11:22:52 +0000 |
commit | d5ee9b2f480ddbda0b8f69409698d27c99384f9c (patch) | |
tree | 2664e91ce8bbfedeaf34292fca1d5dcfb8039176 /source3/nsswitch | |
parent | 5452ecebc7d89fac6e1047b92b77be47fe85914c (diff) | |
download | samba-d5ee9b2f480ddbda0b8f69409698d27c99384f9c.tar.gz samba-d5ee9b2f480ddbda0b8f69409698d27c99384f9c.tar.bz2 samba-d5ee9b2f480ddbda0b8f69409698d27c99384f9c.zip |
Jeremy merged across my string parinoia fixes, but forgot to enable them! :-)
This patch catches up on the rest of the work - as much string checking
as is possible is done at compile time, and the rest at runtime.
Lots of code converted to pstrcpy() etc, and other code reworked to correctly
call sizeof().
Andrew Bartlett
(This used to be commit c5b604e2ee67d74241ae2fa07ae904647d35a2be)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r-- | source3/nsswitch/winbindd_wins.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_wins.c b/source3/nsswitch/winbindd_wins.c index 8ddd5dc10d..a1d38ed69a 100644 --- a/source3/nsswitch/winbindd_wins.c +++ b/source3/nsswitch/winbindd_wins.c @@ -137,8 +137,8 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) SAFE_FREE(status); return WINBINDD_ERROR; } - safe_strcat(response,state->request.data.winsreq,maxlen); - safe_strcat(response,"\t",maxlen); + fstrcat(response,state->request.data.winsreq); + fstrcat(response,"\t"); for (i = 0; i < count; i++) { /* ignore group names */ if (status[i].flags & 0x80) continue; @@ -148,8 +148,8 @@ enum winbindd_result winbindd_wins_byip(struct winbindd_cli_state *state) SAFE_FREE(status); return WINBINDD_ERROR; } - safe_strcat(response, status[i].name, maxlen); - safe_strcat(response, " ", maxlen); + fstrcat(response, status[i].name); + fstrcat(response, " "); } } /* make last character a newline */ @@ -190,16 +190,16 @@ enum winbindd_result winbindd_wins_byname(struct winbindd_cli_state *state) /* Clear out the newline character */ response[strlen(response)-1] = ' '; } - safe_strcat(response,addr,maxlen); - safe_strcat(response,"\t",maxlen); + fstrcat(response,addr); + fstrcat(response,"\t"); } size = strlen(state->request.data.winsreq) + strlen(response); if (size > maxlen) { SAFE_FREE(ip_list); return WINBINDD_ERROR; } - safe_strcat(response,state->request.data.winsreq,maxlen); - safe_strcat(response,"\n",maxlen); + fstrcat(response,state->request.data.winsreq); + fstrcat(response,"\n"); SAFE_FREE(ip_list); } else return WINBINDD_ERROR; |