#11 segfault in ciped running ip-up

open
nobody
None
5
2006-08-31
2006-08-31
Anonymous
No

When 'ifconfig' option is 'true'
and 'ipaddr' or 'ptpaddr' is not specified,
segmentation fault occurs, when running ip-up.

The BUG in ciped.c (version 1.6), line 907 & 908

sprintf(bufc, "%s", inet_ntoa(OAaddr(ipaddr)));
sprintf(bufd, "%s", inet_ntoa(OAaddr(ptpaddr)));

need to be replaced with:

/* mmarkk eliminate segfault */
sprintf(bufc, "%s",
OA(ipaddr)?inet_ntoa(OAaddr(ipaddr)):"");
sprintf(bufd, "%s",
OA(ptpaddr)?inet_ntoa(OAaddr(ptpaddr)):"");

I think it is right.
----
CIPE is cool, thanks for work
plase email me ( marik AT yandex DOT ru ) when this
will be done.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    i forgot to say, bug occurs when doing (x)->..., while
    x=NULL (just nullpointer dereference)

     
  • Nobody/Anonymous

    Logged In: NO

    i forgot to say, bug occurs when doing (x)->..., while
    x=NULL (just nullpointer dereference)

     

Log in to post a comment.