diff options
author | Jeremy Allison <jra@samba.org> | 2008-02-08 22:02:00 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-02-08 22:02:00 -0800 |
commit | 20d6ebe813955866e70c0b91ef316830e1612437 (patch) | |
tree | e401fe8b7f751c8140fb7b3c57c7952fa331f608 /source3 | |
parent | 0b583e4329a4a47918329d9022feb6ab8c54bb33 (diff) | |
download | samba-20d6ebe813955866e70c0b91ef316830e1612437.tar.gz samba-20d6ebe813955866e70c0b91ef316830e1612437.tar.bz2 samba-20d6ebe813955866e70c0b91ef316830e1612437.zip |
We don't need the extra null termination - we've
already got this in the cli_receive_trans calls.
Jeremy.
(This used to be commit 99424bba7bb45b05d970bab4a5e93f2cb636fcbb)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clilist.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c index d913096b12..e1b16154f2 100644 --- a/source3/libsmb/clilist.c +++ b/source3/libsmb/clilist.c @@ -83,20 +83,15 @@ static size_t interpret_long_filename(TALLOC_CTX *ctx, * instead of +2 as the STR_TERMINATE flag below is * actually used as the length calculation. * The len+2 is merely an upper bound. - * We ensure we don't get a one byte overread by - * doing a zero termination at pdata_end[-1]; - * JRA + kukks */ + * Due to the explicit 2 byte null termination + * in cli_receive_trans/cli_receive_nt_trans + * we know this is safe. JRA + kukks + */ if (p + len + 1 > pdata_end) { return pdata_end - base; } - /* Ensure the null termination (see above). */ - { - char *pend = CONST_DISCARD(char *, pdata_end); - pend[-1] = '\0'; - } - /* the len+2 below looks strange but it is important to cope with the differences between win2000 and win9x for this call |