* [ltt-dev] [UST PATCH] null check for disable_marker
@ 2010-09-10 21:28 Douglas Santos
2010-09-11 15:18 ` Mathieu Desnoyers
2010-09-11 15:20 ` Mathieu Desnoyers
0 siblings, 2 replies; 4+ messages in thread
From: Douglas Santos @ 2010-09-10 21:28 UTC (permalink / raw)
---
libust/tracectl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libust/tracectl.c b/libust/tracectl.c
index f1b644c..dd61ebe 100644
--- a/libust/tracectl.c
+++ b/libust/tracectl.c
@@ -1064,7 +1064,9 @@ int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
- if(marker_name == NULL) {
+ if(channel_name == NULL || marker_name == NULL) {
+ WARN("invalid marker name");
+ goto next_cmd;
}
result = ltt_marker_disconnect(channel_name, marker_name, "default");
--
1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [ltt-dev] [UST PATCH] null check for disable_marker
2010-09-10 21:28 [ltt-dev] [UST PATCH] null check for disable_marker Douglas Santos
@ 2010-09-11 15:18 ` Mathieu Desnoyers
2010-09-13 12:32 ` Nils Carlson
2010-09-11 15:20 ` Mathieu Desnoyers
1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-09-11 15:18 UTC (permalink / raw)
* Douglas Santos (douglas.santos at polymtl.ca) wrote:
(Signed-off-by: Douglas Santos <douglas.santos at polymtl.ca>)
Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
> libust/tracectl.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/libust/tracectl.c b/libust/tracectl.c
> index f1b644c..dd61ebe 100644
> --- a/libust/tracectl.c
> +++ b/libust/tracectl.c
> @@ -1064,7 +1064,9 @@ int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
>
> result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
>
> - if(marker_name == NULL) {
> + if(channel_name == NULL || marker_name == NULL) {
> + WARN("invalid marker name");
> + goto next_cmd;
> }
>
> result = ltt_marker_disconnect(channel_name, marker_name, "default");
> --
> 1.7.0.4
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread* [ltt-dev] [UST PATCH] null check for disable_marker
2010-09-11 15:18 ` Mathieu Desnoyers
@ 2010-09-13 12:32 ` Nils Carlson
0 siblings, 0 replies; 4+ messages in thread
From: Nils Carlson @ 2010-09-13 12:32 UTC (permalink / raw)
pulled, thanks.
/Nils
On Sat, 11 Sep 2010, Mathieu Desnoyers wrote:
> * Douglas Santos (douglas.santos at polymtl.ca) wrote:
>
> (Signed-off-by: Douglas Santos <douglas.santos at polymtl.ca>)
>
> Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>
>> ---
>> libust/tracectl.c | 4 +++-
>> 1 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/libust/tracectl.c b/libust/tracectl.c
>> index f1b644c..dd61ebe 100644
>> --- a/libust/tracectl.c
>> +++ b/libust/tracectl.c
>> @@ -1064,7 +1064,9 @@ int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
>>
>> result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
>>
>> - if(marker_name == NULL) {
>> + if(channel_name == NULL || marker_name == NULL) {
>> + WARN("invalid marker name");
>> + goto next_cmd;
>> }
>>
>> result = ltt_marker_disconnect(channel_name, marker_name, "default");
>> --
>> 1.7.0.4
>>
>>
>> _______________________________________________
>> ltt-dev mailing list
>> ltt-dev at lists.casi.polymtl.ca
>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>>
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ltt-dev] [UST PATCH] null check for disable_marker
2010-09-10 21:28 [ltt-dev] [UST PATCH] null check for disable_marker Douglas Santos
2010-09-11 15:18 ` Mathieu Desnoyers
@ 2010-09-11 15:20 ` Mathieu Desnoyers
1 sibling, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2010-09-11 15:20 UTC (permalink / raw)
* Douglas Santos (douglas.santos at polymtl.ca) wrote:
> ---
> libust/tracectl.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/libust/tracectl.c b/libust/tracectl.c
> index f1b644c..dd61ebe 100644
> --- a/libust/tracectl.c
> +++ b/libust/tracectl.c
> @@ -1064,7 +1064,9 @@ int process_client_cmd(char *recvbuf, struct ustcomm_source *src)
>
> result = sscanf(channel_slash_name, "%a[^/]/%as", &channel_name, &marker_name);
>
> - if(marker_name == NULL) {
> + if(channel_name == NULL || marker_name == NULL) {
> + WARN("invalid marker name");
> + goto next_cmd;
Please look just above in the same function, you'll notice a sscanf with
255 char limits rather than "%a". It's odd to have both which are
different in the same function. Anyone willing to make them all the same ?
(%a is preferred, as it does not have a static size limit)
Thanks,
Mathieu
> }
>
> result = ltt_marker_disconnect(channel_name, marker_name, "default");
> --
> 1.7.0.4
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-13 12:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-10 21:28 [ltt-dev] [UST PATCH] null check for disable_marker Douglas Santos
2010-09-11 15:18 ` Mathieu Desnoyers
2010-09-13 12:32 ` Nils Carlson
2010-09-11 15:20 ` Mathieu Desnoyers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox