[vlc-devel] [PATCH] vlc_common: fix swab() calls on win32 that don't use const on source pointer

Rémi Denis-Courmont remi at remlab.net
Mon Jul 15 12:52:20 CEST 2019


Forget that. It seems wrong due to missing expansion safety of the parameters.

Le 15 juillet 2019 13:51:04 GMT+03:00, "Rémi Denis-Courmont" <remi at remlab.net> a écrit :
>Probably OK. Won't work if swab is taken as a pointer but we can
>probably ignore that for the time being
>
>Le 15 juillet 2019 13:43:16 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz>
>a écrit :
>>---
>> include/vlc_common.h | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>>diff --git a/include/vlc_common.h b/include/vlc_common.h
>>index 78d4c17850..08b1206f5d 100644
>>--- a/include/vlc_common.h
>>+++ b/include/vlc_common.h
>>@@ -1106,6 +1106,11 @@ static inline void SetQWLE (void *p, uint64_t
>>qw)
>> #   ifndef O_NONBLOCK
>> #       define O_NONBLOCK 0
>> #   endif
>>+
>>+/* the mingw32 swab() and win32 _swab() prototypes expect a char*
>>instead of a
>>+   const void* */
>>+#  define swab(a,b,c)  swab((char*) a, (char*)b, c)
>>+
>> #endif /* _WIN32 */
>> 
>> typedef struct {
>>-- 
>>2.17.1
>>
>>_______________________________________________
>>vlc-devel mailing list
>>To unsubscribe or modify your subscription options:
>>https://mailman.videolan.org/listinfo/vlc-devel
>
>-- 
>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser
>ma brièveté.

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190715/81b78083/attachment.html>


More information about the vlc-devel mailing list