> +static inline int path_is_extended(const wchar_t *path) > +{ > + size_t len = wcslen(path); > + if (len >= 4 && path[0] == L'\\' && (path[1] == L'\\' || path[1] == L'?') > && path[2] == L'?' && path[3] == L'\\')
Length check is probably unnecessary: comparisons will reject '\0' and further comparisons won't run due to short-circuiting. > + // The length of unc_prefix is 6 plus 1 for terminating zeros > + temp_w = (wchar_t *)av_calloc(len + 6 + 1, sizeof(wchar_t)); Not really true. The length of unc_prefix is 8. 2 is subtracted because UNC path already has \\ at the beginning. > + if (len >= 260 || (*ppath_w)[len - 1] == L' ' || (*ppath_w)[len - 1] == > L'.') { 1. Please change 260 to MAX_PATH. 2. GetFullPathName removes trailing spaces and dots, so the second part is always false. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".