lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140827162246.GH5803@tassilo.jf.intel.com>
Date:	Wed, 27 Aug 2014 09:22:46 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	kan.liang@...el.com
Cc:	acme@...nel.org, jolsa@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 2/3] perf tools: parse the pmu event prefix and surfix

> +	while ((pmu = perf_pmu__scan(pmu)) != NULL)
> +		list_for_each_entry(alias, &pmu->aliases, list) {
> +			if (!strcmp(pmu->name, "cpu")) {
> +				struct kernel_pmu_event_symbol *p =
> +					kernel_pmu_events_list + len;
> +				char *tmp = strchr(alias->name, '-');
> +
> +				if (tmp != NULL) {
> +					strncpy(p->symbol, alias->name,
> +							tmp - alias->name);

Please use strlcpy(). Otherwise p->symbol may not be zero terminated.

The rest of the patch looks good to me.

-Andi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ