Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91e4ee38 authored by Gerhard Dirschl's avatar Gerhard Dirschl Committed by Linus Torvalds
Browse files

[PATCH] pktcdvd: Correctly set cmd_len field in pkt_generic_packet

Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7810

 - a silly
copy-paste bug introduced by the latest change.

Signed-off-by: default avatarGerhard Dirschl <gd@spherenet.de>
Cc: Peter Osterlund <petero2@telia.com>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1df49008
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -765,7 +765,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
			goto out;
	}

	rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
	rq->cmd_len = COMMAND_SIZE(cgc->cmd[0]);
	memcpy(rq->cmd, cgc->cmd, CDROM_PACKET_SIZE);
	if (sizeof(rq->cmd) > CDROM_PACKET_SIZE)
		memset(rq->cmd + CDROM_PACKET_SIZE, 0, sizeof(rq->cmd) - CDROM_PACKET_SIZE);