stdio-common/vfscanf.c
For b/19289207, backport memory allocation fix for wscanf (PR16618)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06
+
+socket/sys/un.h
+ Replace null dereference in the SUN_LEN macro with offsetof.
+ (nlewycky, not yet upstream)
#ifdef __USE_MISC
+# include <stddef.h> /* For offsetof. */
# include <string.h> /* For prototype of `strlen'. */
/* Evaluate to actual length of the `sockaddr_un' structure. */
-# define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \
+# define SUN_LEN(ptr) (offsetof(struct sockaddr_un, sun_path) \
+ strlen ((ptr)->sun_path))
#endif