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...