Re: [patch 6/6] s390: qeth network driver.
From: Jeff Garzik (jgarzik_at_pobox.com)
Date: 11/30/04
- Previous message: Phil Dier: "Re: oops with dual xeon 2.8ghz 4gb ram +smp, software raid, lvm, and xfs"
- In reply to: Martin Schwidefsky: "[patch 6/6] s390: qeth network driver."
- Next in thread: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Reply: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Nov 2004 12:48:03 -0500 To: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky wrote:
> @@ -1308,6 +1326,15 @@
> continue;
> if (ipaddr->type != QETH_IP_TYPE_RXIP)
> continue;
> + /* String must not be longer than PAGE_SIZE. So we check for
> + * length >= 3900 here. Then we can savely display the next
> + * IPv6 address and our info message below */
> + if (i >= 3900) {
> + i += sprintf(buf + i,
> + "... Too many entries to be displayed. "
> + "Skipping remaining entries.\n");
> + break;
> + }
ACK, although I dislike the open-coding of the magic number 3900.
3900 strikes me as an engineer's guess, not a rigorous limit on strings,
thus inviting the possibility of a buffer overflow years later.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Phil Dier: "Re: oops with dual xeon 2.8ghz 4gb ram +smp, software raid, lvm, and xfs"
- In reply to: Martin Schwidefsky: "[patch 6/6] s390: qeth network driver."
- Next in thread: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Reply: Alan Cox: "Re: [patch 6/6] s390: qeth network driver."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|