Messages in this thread | | | Date | Tue, 30 Nov 2004 12:48:03 -0500 | From | Jeff Garzik <> | Subject | Re: [patch 6/6] s390: qeth network driver. |
| |
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/
| |