This is the mail archive of the
mailing list for the systemtap project.
Re: bug in src/tapset/string.stp
- From: Martin Hunt <hunt at redhat dot com>
- To: Jonathan Brassow <jbrassow at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Mon, 21 Aug 2006 10:24:36 -0400
- Subject: Re: bug in src/tapset/string.stp
- Organization: Red Hat Inc.
- References: <email@example.com>
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.