lkml.org 
[lkml]   [2004]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] kernel events layer
    From
    Date
    On Sat, 2004-07-24 at 00:32 +0300, Dan Aloni wrote:

    > IMHO you either should not assume anything about the length of the object
    > string, _or_ do the complete safe string assembly e.g:
    >
    > len += snprintf(buffer, PAGE_SIZE, "From: %s\nSignal: %s\n",
    > object, signal);
    >

    Fair enough. I guess what we want, exactly, is:

    len = snprintf(buffer, PAGE_SIZE, "From: %s\n", object);
    len += snprintf(&buffer[len], PAGE_SIZE - len "Signal: %s\n", signal);

    I will add that to the next revision.

    Robert Love


    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:04    [W:0.020 / U:2.772 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site