This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tapsets/15617] New: user_string_n_quoted() does not truncate properly


http://sourceware.org/bugzilla/show_bug.cgi?id=15617

            Bug ID: 15617
           Summary: user_string_n_quoted() does not truncate properly
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: jlebon at redhat dot com

The length of the string returned by user_string_n_quoted() is one longer than
dictated by n. For example:

stap -e 'probe nd_syscall.write { if (pid() == target()) { printf("%s\n",
user_string_n_quoted(buf_uaddr, 15)); exit()}}' -c 'echo this_is_a_test >
/dev/null'

Prints out

"this_is_a_t"...

which is 16 characters long, not 15.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]