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]

Re: bug in src/tapset/string.stp


On Fri, 2006-08-18 at 16:34 +0000, Jonathan Brassow wrote:
> The strncpy and following null termination act as though the 'stop'
> param is a 'len' param, and thus returns a string that may be longer
> than what was asked for.

Yeah, that's a very buggy function that needs some better docs and test
cases for the testsuite. Thanks for pointing that out.

Your patch fixed it so the "stop" parameter was the stop character, but
I'm going to assume that the function should really work like Perl's
substr and the "stop" parameter" should be renamed "length".

I'll check in a fix for that, as soon as I write testsuite cases for all
the other functions in strings.stp that are missing them.

Martin
 


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