tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: nvi db glue missing prototypes
In article <20090315204616.GA29323%panix.com@localhost>,
Jed Davis <jld%NetBSD.org@localhost> wrote:
>-=-=-=-=-=-
>
>Three of the functions defined in dist/nvi/common/db1.c are missing
>prototypes in db.h. In particular, on amd64, treating the char*
>return of db_strerror as implicitly int causes the pointer to be
>truncated to 32 bits when passed to snprintf, causing vi to segfault
>when accidentally run on a file without read permission.
>
>I've attached a patch that provides prototypes for those functions
>and fixes the crash I encountered. I'm not entirely sure how/if the
>#ifdef USE_DYNAMIC_LOADING case is supposed to work, so I kept all that
>together and moved it to the bottom of db.h, where the types involved
>all have the correct definitions.
>
>Comments? Can this be committed?
This will duplicate the prototypes in dbinternal.h which you should
remove if you apply this patch... Other than that looks fine to me.
christos
Home |
Main Index |
Thread Index |
Old Index