Re: Problem with scan.c

David Leadbeater <[email protected]>
Newsgroups gmane.network.irc.bopm
Message-ID <[email protected]>
Chris Flevotomos wrote:
> Hello all,
> 
> I have a problem while trying to scan a client.
> 
> I use the last version (bopm-3.1.2) with gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7) on a Conference Room Server (1.8.4). I found out the right connregex and as I notice it gets the hostname, but it cannot resolve it to IP to scan it.

BOPM can't resolve hosts, see the BOPM list archives..
http://article.gmane.org/gmane.network.irc.bopm/1611/match=conferenceroom
looks relevant.

> When a user is connecting to the CR, bopm exits with Segmentation Fault. I tried to debug it as much as I could, and I saw that it cannot execute the following code, only if the user mask has a hostname (not an IP):
> 
>                   case OPM_ERR_BADADDR: 
>                      log_printf("OPM -> Bad address %s [%s].",
>                            ss->manual_target->name, ss->ip);
>                      break;
> 
> this is a part of :
> 
>             if((ret = opm_scan(scs->scanner, ss->remote)) != OPM_SUCCESS)
>             {
>                switch(ret)
>                {
>                   case OPM_ERR_NOPROTOCOLS:
>                      continue;
>                      break;
>                   case OPM_ERR_BADADDR: 
>                      log_printf("OPM -> Bad address %s [%s].",
>                            ss->manual_target->name, ss->ip);
>                      break;
>                     default:
>                      log_printf("OPM -> Unknown error %s [%s].",
>                            ss->manual_target->name, ss->ip);
>                      break;
>                }
>             } 
> 
> When the program tries to execute the ss-manual_target->name then it crashes.. If I remove this variable it can't resolve the hostname but it doesn't crash.

This seems to be a bug, but as you said it only happens when BOPM is configured
incorrectly. (And it's just a null pointer dereference).
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.