Re: [PATCH net] qeth: avoid buffer overflow in snmp ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Frank Blaschka <blaschka@xxxxxxxxxxxxxxxxxx>
Date: Tue, 5 Nov 2013 15:14:00 +0100

> +	if (req_len > QETH_BUFSIZE - IPA_PDU_HEADER_SIZE
> +				   - sizeof(struct qeth_ipacmd_hdr)
> +				   - sizeof(struct qeth_ipacmd_setadpparms_hdr))
> +		return -EINVAL;

Please fix the indentation and parenthesize the more complicated right
side of the expression, it should be something like:

	if (req_len > (QETH_BUFSIZE - IPA_PDU_HEADER_SIZE -
		       sizeof(struct qeth_ipacmd_hdr) -
		       sizeof(struct qeth_ipacmd_setadpparms_hdr)))

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]