[vlc-devel] commit: Revert "fix buffer overflows." ( Rémi Duraffort )
git version control
git at videolan.org
Thu Jan 29 17:04:33 CET 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Jan 29 17:03:36 2009 +0100| [3514349e204d0453d43645bad3ba1cee0fef959f] | committer: Rémi Duraffort
Revert "fix buffer overflows."
We use a sizeof and not a strlen so that's ok.
This reverts commit 8ecb5ba1086fc58bf12e33a2de8e73fe859bc33e.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3514349e204d0453d43645bad3ba1cee0fef959f
---
src/libvlc.c | 4 ++--
src/playlist/loadsave.c | 4 ++--
src/stream_output/sdp.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 2307388..f297420 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -1438,8 +1438,8 @@ static void Usage( libvlc_int_t *p_this, char const *psz_search )
#endif
char psz_spaces_text[PADDING_SPACES+LINE_START+1];
char psz_spaces_longtext[LINE_START+3];
- char psz_format[sizeof(COLOR_FORMAT_STRING) + 1];
- char psz_format_bool[sizeof(COLOR_FORMAT_STRING_BOOL) + 1];
+ char psz_format[sizeof(COLOR_FORMAT_STRING)];
+ char psz_format_bool[sizeof(COLOR_FORMAT_STRING_BOOL)];
char psz_buffer[10000];
char psz_short[4];
int i_width = ConsoleWidth() - (PADDING_SPACES+LINE_START+1);
diff --git a/src/playlist/loadsave.c b/src/playlist/loadsave.c
index 81d1645..2fc19c0 100644
--- a/src/playlist/loadsave.c
+++ b/src/playlist/loadsave.c
@@ -212,11 +212,11 @@ int playlist_MLDump( playlist_t *p_playlist )
if( !config_GetInt( p_playlist, "media-library") ) return VLC_SUCCESS;
if( !psz_datadir ) /* XXX: This should never happen */
{
- msg_Err( p_playlist, "no data directory, cannot save media library");
+ msg_Err( p_playlist, "no data directory, cannot save media library") ;
return VLC_EGENERIC;
}
- char psz_dirname[strlen( psz_datadir ) + sizeof( DIR_SEP "ml.xspf" ) + 1];
+ char psz_dirname[ strlen( psz_datadir ) + sizeof( DIR_SEP "ml.xspf")];
strcpy( psz_dirname, psz_datadir );
free( psz_datadir );
if( config_CreateDir( (vlc_object_t *)p_playlist, psz_dirname ) )
diff --git a/src/stream_output/sdp.c b/src/stream_output/sdp.c
index 3db8459..d2c0610 100644
--- a/src/stream_output/sdp.c
+++ b/src/stream_output/sdp.c
@@ -267,7 +267,7 @@ char *vlc_sdp_Start (vlc_object_t *obj, const char *cfgpref,
if (cfglen > 100)
return NULL;
- char varname[cfglen + sizeof ("description") + 1], *subvar = varname + cfglen;
+ char varname[cfglen + sizeof ("description")], *subvar = varname + cfglen;
strcpy (varname, cfgpref);
strcpy (subvar, "name");
More information about the vlc-devel
mailing list