diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-03-01 01:07:18 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-03-01 01:07:18 +0000 |
commit | 4e5439438c452e7153f122de2ca7428e885b4c6a (patch) | |
tree | 7a1c9f63424d47c6d32be14bf78cfdc66e1fd1ff /source3/libsmb | |
parent | 728da472c2c25afcfc0115e5c6bd78cf6df14ee8 (diff) | |
download | samba-4e5439438c452e7153f122de2ca7428e885b4c6a.tar.gz samba-4e5439438c452e7153f122de2ca7428e885b4c6a.tar.bz2 samba-4e5439438c452e7153f122de2ca7428e885b4c6a.zip |
the new DEVELOPER checks for string overflows have (as expected)
broken a lot of stuff. These two macros are meant to make life easier
when fixing these bugs. I'm guessing we will see more macros like
this (eg. fstrcpy_base)
(This used to be commit 50389c0cb2504d7941ec691af21d6a20ae5c5de7)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clirap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c index f8f840abaa..24108d40f3 100644 --- a/source3/libsmb/clirap.c +++ b/source3/libsmb/clirap.c @@ -221,10 +221,10 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, p = param; SSVAL(p,0,0x68); /* api number */ p += 2; - pstrcpy(p,"WrLehDz"); + pstrcpy_base(p,"WrLehDz", param); p = skip_string(p,1); - pstrcpy(p,"B16BBDz"); + pstrcpy_base(p,"B16BBDz", param); p = skip_string(p,1); SSVAL(p,0,uLevel); @@ -233,7 +233,7 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, SIVAL(p,0,stype); p += 4; - p += push_pstring(p, workgroup); + p += push_pstring_base(p, workgroup, param); if (cli_api(cli, param, PTR_DIFF(p,param), 8, /* params, length, max */ |