The Samba-Bugzilla – Attachment 5173 Details for
Bug 7028
include scannedonly VFS module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am patch for 3.5.0 part 3
0003-Fix-two-uses-of-strncat-strlcat.-Ensure-proper-us.patch (text/plain), 1.42 KB, created by
Jeremy Allison
on 2010-01-13 17:14:32 UTC
(
hide
)
Description:
git-am patch for 3.5.0 part 3
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-01-13 17:14:32 UTC
Size:
1.42 KB
patch
obsolete
>From b889d40a4c8d0439690402b60eac97c8dba321ed Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 12 Jan 2010 21:18:36 -0800 >Subject: [PATCH] Fix two uses of strncat -> strlcat. Ensure proper use of strncpy when setting socket name. > >Jeremy. >(cherry picked from commit ed457e07b9bdc0acda9dc52307d8bc2118f32f06) >--- > source3/modules/vfs_scannedonly.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c >index 6995898..ff16d78 100644 >--- a/source3/modules/vfs_scannedonly.c >+++ b/source3/modules/vfs_scannedonly.c >@@ -200,7 +200,7 @@ static int connect_to_scanner(vfs_handle_struct * handle) > } > saun.sun_family = AF_UNIX; > strncpy(saun.sun_path, so->socketname, >- strlen(so->socketname) + 1); >+ sizeof(saun.sun_path) - 1); > if (connect(so->socket, (struct sockaddr *)(void *)&saun, > SUN_LEN(&saun)) < 0) { > DEBUG(2, ("failed to connect to socket %s\n", >@@ -323,8 +323,8 @@ static void notify_scanner(vfs_handle_struct * handle, const char *scanfile) > if (gsendlen + tmplen >= SENDBUFFERSIZE) { > flush_sendbuffer(handle); > } >- strncat(so->gsendbuffer, tmp, tmplen); >- strncat(so->gsendbuffer, "\n", 1); >+ strlcat(so->gsendbuffer, tmp, SENDBUFFERSIZE + 1); >+ strlcat(so->gsendbuffer, "\n", SENDBUFFERSIZE + 1); > } > > static bool is_scannedonly_file(struct Tscannedonly *so, const char *shortname) >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 7028
:
5171
|
5172
| 5173 |
5178
|
5185
|
5199