« Return to Thread: [PATCH] Fix Segmentation fault of -s option

[PATCH] Fix Segmentation fault of -s option

by Naohiro Ooiwa :: Rate this Message:

| View in Thread

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

 « Return to Thread: [PATCH] Fix Segmentation fault of -s option