Re: [patch 6/6] s390: qeth network driver.

From: Jeff Garzik (jgarzik_at_pobox.com)
Date: 11/30/04

  • Next message: Jesse Pollard: "Re: file as a directory"
    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/


  • Next message: Jesse Pollard: "Re: file as a directory"

    Relevant Pages

    • Re: [BENCHMARK] nproc: netlink access to /proc information
      ... > strings is expensive. ... /proc performance does not scale if we have to ... as I see that the internal algorithms actually dominate the runtime ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] JFS: sane file name handling (0 of 2)
      ... the second one changes the default translation of filenames into unicode. ... the character set of the file names rather than just treating them as strings ... while still allowing the charset-specific behavior with the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RFC: Representation of large hex values
      ... Replacing the comma with the underscore and moving the whole shebang ... to printf/scanf sounds like a good idea to me. ... like strings and ints. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: IBM Thinkpad T42 - Looking for a Developer.
      ... >> they completely freely distributable or are there strings attached? ... The more useful one tells that there are two possible interfaces: ... - USB ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Linuxant/Conexant HSF/HCF Modem Drivers Unlocked
      ... Chad Christopher Giffin wrote: ... > I couldn't help but notice that the Linuxant Modem drivers appear to be ... as a strings of the modules shows that License=GPL. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)