[PATCH] Fix Segmentation fault of -s option

View: New views
3 Messages — Rating Filter:   Alert me  

[PATCH] Fix Segmentation fault of -s option

by Naohiro Ooiwa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sergey Poznyakoff

I found a little bug.

  # cflow-1.2/src/cflow -s main.c
  Segmentation fault

I fixed it.
Could you please check my patch?


Best Regards,
Naohiro Ooiwa


 main.c |    5 +++++
 1 file changed, 5 insertions(+)

--- cflow-1.2/src/main.c.orig 2007-06-27 23:16:46.000000000 +0900
+++ cflow-1.2/src/main.c 2009-06-26 19:08:50.000000000 +0900
@@ -257,6 +257,11 @@ symbol_override(const char *str)
      Symbol *sp;

      ptr = strchr(str, ':');
+
+     if (ptr == NULL) {
+  error(0, 0, _("no argument of symbol"));
+  return;
+     }
      if (*ptr == ':') {
   type = find_option_type(symbol_optype, ptr+1, 0);
   if (type == 0) {


_______________________________________________
bug-cflow mailing list
bug-cflow@...
http://lists.gnu.org/mailman/listinfo/bug-cflow

Re: [PATCH] Fix Segmentation fault of -s option

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

> I found a little bug.
>
>   # cflow-1.2/src/cflow -s main.c
>   Segmentation fault
>
> I fixed it.

Thanks!

> Could you please check my patch?

Sure, your patch is OK.  I have applied it.

Best regards,
Sergey


_______________________________________________
bug-cflow mailing list
bug-cflow@...
http://lists.gnu.org/mailman/listinfo/bug-cflow

Re: [PATCH] Fix Segmentation fault of -s option

by Naohiro Ooiwa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sergey

Thank you for your reply.
Recentry, I knew the cflow.
I like it.

Best Regards,
Naohiro Ooiwa

Sergey Poznyakoff wrote:

> Hello,
>
>> I found a little bug.
>>
>>   # cflow-1.2/src/cflow -s main.c
>>   Segmentation fault
>>
>> I fixed it.
>
> Thanks!
>
>> Could you please check my patch?
>
> Sure, your patch is OK.  I have applied it.
>
> Best regards,
> Sergey
>



_______________________________________________
bug-cflow mailing list
bug-cflow@...
http://lists.gnu.org/mailman/listinfo/bug-cflow