In all the source files in the folder DVB/apps/tuxzap I can see things
like :
char path[256];
ostringstream str(string(path,256));
Then the author initializes the string `str' correctly and after that
he uses the pointer `path'. This is wrong, because in the current
implementation of the STL string() makes a copy of `path', so the
variables `str' and `path' don't share the same buffer.
In result I can successfully compile the applications
{r,n,}tux{player,view,zap} but they aren't working and I can see a lot
of random characters instead of the messages.
I think it's better if the author corrects the bugs himself, but if
you ask me I can make a patch by adding some strncpy() when needed.
--
Nicolas Baradakis
--
Info:
To unsubscribe send a mail to [EMAIL PROTECTED] with "unsubscribe linux-dvb" as subject.
- [linux-dvb] Re: Dangerous mix between C++ strings and C ... Nicolas Baradakis
- [linux-dvb] Re: Dangerous mix between C++ strings a... Holger Waechtler
- [linux-dvb] Re: Dangerous mix between C++ strin... Nicolas Baradakis
- [linux-dvb] Dangerous mix between C++ strings and C... Marcus Metzler
- [linux-dvb] Re: Dangerous mix between C++ strin... Nicolas Baradakis
- [linux-dvb] Re: Dangerous mix between C++ s... Marcus Metzler
- [linux-dvb] Re: Dangerous mix between C... Nicolas Baradakis
- [linux-dvb] Re: Dangerous mix between C++ strin... Christian Pesch
- [linux-dvb] Re: Dangerous mix between C++ s... Marcus Metzler
