[prev in list] [next in list] [prev in thread] [next in thread]
List: mplayer-dev-eng
Subject: Re: [MPlayer-dev-eng] Re: [PATCH] fix for unconditional use of
From: Robert Millan <zeratul2 () wanadoo ! es>
Date: 2003-04-29 21:45:27
Message-ID: 20030429214527.GA676 () aragorn
[Download RAW message or body]
On Tue, Apr 29, 2003 at 06:17:34PM +0200, Tobias Diedrich wrote:
> Robert Millan wrote:
>
> > consider the following call in mplayer.c:
> >
> > char cwd[PATH_MAX+2]
> > [...]
> > getcwd(cwd, PATH_MAX)
> >
> > If you hardcode PATH_MAX to, say 512, you'd be declaring a 512-byte
> > buffer and telling getcwd to write the current path to it. If the
> > current path is longer than 512, we're dead. mplayer would crash on
>
> No, the above code would declare a 514 byte buffer and getcwd would
> write at most 512 bytes because of the size parameter. If it does not
> honor that, than it's a bug of your libc.
eek.. you caught me. actualy getcwd would fail and return ERANGE,
which is still bad. please fix..
--
Robert Millan
make: *** No rule to make target `war'. Stop.
Another world is possible - Just say no to genocide
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic