[PATCH] Fix bug 9811 - Old DOS SMB CTEMP request uses a non-VFS function to access the filesystem.
Andreas Schneider
asn at samba.org
Fri Apr 19 03:01:54 MDT 2013
On Thursday 18 April 2013 10:28:30 Jeremy Allison wrote:
> Move to using the same mechanism that the ntvfs server
> uses to implement this call.
+ char *wire_name = NULL;
...
+ for (i = 0; i < 10; i++) {
+ if (*wire_name) {
As wire_name can be NULL the if check should look like this:
if (wire_name != NULL && wire_name[0] != '\0')
+ fname = talloc_asprintf(ctx,
+ "%s/TMP%s",
+ wire_name,
+ generate_random_str_list(ctx, 5, "0123456789"));
+ } else {
+ fname = talloc_asprintf(ctx,
+ "TMP%s",
+ generate_random_str_list(ctx, 5, "0123456789"));
+ }
- status = filename_convert(ctx, conn,
+ if (!fname) {
Please use:
if (fname == NULL)
+ reply_nterror(req, NT_STATUS_NO_MEMORY);
+ goto out;
+ }
+
+ status = filename_convert(ctx, conn,
-- andreas
--
Andreas Schneider GPG-ID: F33E3FC6
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list