|
From: Masami H. <mhi...@re...> - 2009-09-28 16:48:35
|
Steven Rostedt wrote:
> On Fri, 2009-09-25 at 12:15 -0700, Masami Hiramatsu wrote:
>
>> +
>> +#define MAX_CMDLEN 256
>> +
>> +static int synthesize_probepoint(struct probe_point *pp)
>> +{
>> + char *buf;
>> + int i, len, ret;
>> + pp->probes[0] = buf = (char *)calloc(MAX_CMDLEN, sizeof(char));
>> + len = snprintf(buf, MAX_CMDLEN, "%s+%d", pp->function, pp->offset);
>
> What happens if func and offset is too big for MAX_CMDLEN?
Oops, it must be checked.
>
>> + for (i = 0; i< pp->nr_args; i++) {
>
> Can you have a case where pp->nr_args == 0?
Sure, I'll check that.
Thank you!
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhi...@re...
|