mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r3867: Fix from david.hu@hp.com - make a copy of an incoming message
rather than indirecting into it as a struct (may not be on an even byte boundary). Bug #2052. Jeremy. (This used to be commit 8a91a69961622a31851f2394c591ddaa61a36000)
This commit is contained in:
parent
4a505a2860
commit
79f7373b33
@ -1201,17 +1201,17 @@ this is the receive function of the background lpq updater
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static void print_queue_receive(int msg_type, pid_t src, void *buf, size_t len)
|
static void print_queue_receive(int msg_type, pid_t src, void *buf, size_t len)
|
||||||
{
|
{
|
||||||
struct print_queue_update_context *ctx;
|
struct print_queue_update_context ctx;
|
||||||
|
|
||||||
if (len != sizeof(struct print_queue_update_context)) {
|
if (len != sizeof(struct print_queue_update_context)) {
|
||||||
DEBUG(1, ("Got invalid print queue update message\n"));
|
DEBUG(1, ("Got invalid print queue update message\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = (struct print_queue_update_context*)buf;
|
memcpy(&ctx, buf, sizeof(struct print_queue_update_context));
|
||||||
print_queue_update_internal(ctx->sharename,
|
print_queue_update_internal(ctx.sharename,
|
||||||
get_printer_fns_from_type(ctx->printing_type),
|
get_printer_fns_from_type(ctx.printing_type),
|
||||||
ctx->lpqcommand );
|
ctx.lpqcommand );
|
||||||
}
|
}
|
||||||
|
|
||||||
static pid_t background_lpq_updater_pid = -1;
|
static pid_t background_lpq_updater_pid = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user