Unix Technical Forum

Re: Anatomy of a bug : bgpd.c 1.105 : part 2

This is a discussion on Re: Anatomy of a bug : bgpd.c 1.105 : part 2 within the mailing.openbsd.tech forums, part of the OpenBSD category; --> * Erblichs <erblichs@earthlink.net> [2004-09-14 01:20]: > Fine group, > > Here are a few questions after a few minutes ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 08:17 AM
Henning Brauer
 
Posts: n/a
Default Re: Anatomy of a bug : bgpd.c 1.105 : part 2

* Erblichs <erblichs@earthlink.net> [2004-09-14 01:20]:
> Fine group,
>
> Here are a few questions after a few minutes
> just scanning the code.
>
> Mitchell Erblich
> Sr Software Engineer
> ---------------------
>
> parse.y : 1.139
>
> parse_config()
>
> There are three calloc's in a row.
> After the 2nd and third calloc's failed
> attempts their should be frees of
> the conf and the conf/mrtconf structs.
>
> Else, it looks like a memory leak.


so, with all your years long experience in commercial software
development you are not able to follow the code path so far to realize
that fatal() terminates bgpd? And sure you know what happens with a
process' allocations when it exits under unix...

> new_peer()
> Calls alloc_peer() but doesn't check if
> p is NULL and return with a NULL if so.
>
> Why not?


so, with all your years long experience in commercial software
development you are not able to spot that alloc_peer() cannot return
NULL?

> bgpd.c
>
> sighdlr()
> Should have a default case.


of course it should not.

> main()
> getuid() returns the effective user id.
> Shouldn't you print the value when you print
> "need root privileges".


no, why. "need root" is pretty clear...

sure shows that commercial software development is superiour to our
little free software toys...

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:29 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com