Re: [matroska] r901 - trunk/DvdMenuXtractor/libdvdread/dvdread

Steve Lhomme <[email protected]>
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Moritz Bunkus a écrit :

> Hey,
> 
> 
>>@@ -393,6 +393,10 @@
>> 	if( strlen( path_copy ) > 1 ) {
>> 	    if( path_copy[ strlen( path_copy ) - 1 ] == '/' ) 
>> 		path_copy[ strlen( path_copy ) - 1 ] = '\0';
>>+#if defined(WIN32)
>>+	    if( path_copy[ strlen( path_copy ) - 1 ] == '\\' ) 
>>+		path_copy[ strlen( path_copy ) - 1 ] = '\0';
>>+#endif
>> 	}
> 
> 
> <nitpickmode>
> This could segfault if path_copy is '\/'. This might not be a valid path
> in Windows, but it should be checked for nevertheless.
> </nitpickmode>

Could be as the path would be a NUL string. Actually the fix should be a 
#if #else #endif...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.