[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: diald? -- Found it!



On Fri 29 Oct 1999, Larrick, Douglas wrote:
> 
> >I have found the cause of diald's crash on startup.  I believe it to 
> >be a bug in, or improper use of, sccanf.  When called as follows:
> 
> OK, with access to my reference books here at work, this is definitely a
> diald bug.

Yup.

>     sscanf(line, "%s %d/%s", name, &serv, proto);
> 
> should be
>     
>     sscanf(line, "%19s %d/%19s", name, &serv, proto);

Does this do the right thing if the first string is longer than 19?
I.e, does it skip the remaining x-19 bytes of the first string, or
does it simply fail to match the other formats, hence not filling in
serv and proto?

IMHO this sort of scanning should always be done using strtok(),
that's much more robust, and easier to check for inconsistencies.

> I'll fix this up and--what?  What's the procedure here?

Submit a diff of your changes as a bug report on diald, accompanied by a
description of what and why. If there's no response within a couple of
weeks, if you're a maintainer, you could do a sourceful NMU.


Paul Slootman
-- 
home:       paul@wurtel.demon.nl http://www.wurtel.demon.nl/
work:       paul@murphy.nl       http://www.murphy.nl/
debian:     paul@debian.org      http://www.debian.org/
isdn4linux: paul@isdn4linux.de   http://www.isdn4linux.de/


Reply to: