mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
Merge pull request #10731 from yuwata/fix-oss-fuzz-11344
Fixes oss-fuzz#11344
This commit is contained in:
commit
bdc0bcf014
@ -65,7 +65,9 @@ static inline size_t FAMILY_ADDRESS_SIZE(int family) {
|
||||
return family == AF_INET6 ? 16 : 4;
|
||||
}
|
||||
|
||||
#define IN_ADDR_NULL ((union in_addr_union) {})
|
||||
/* Workaround for clang, explicitly specify the maximum-size element here.
|
||||
* See also oss-fuzz#11344. */
|
||||
#define IN_ADDR_NULL ((union in_addr_union) { .in6 = {} })
|
||||
|
||||
void in_addr_data_hash_func(const void *p, struct siphash *state);
|
||||
int in_addr_data_compare_func(const void *a, const void *b);
|
||||
|
@ -364,10 +364,10 @@ void route_update(Route *route,
|
||||
assert(route);
|
||||
assert(src || src_prefixlen == 0);
|
||||
|
||||
route->src = src ? *src : (union in_addr_union) {};
|
||||
route->src = src ? *src : IN_ADDR_NULL;
|
||||
route->src_prefixlen = src_prefixlen;
|
||||
route->gw = gw ? *gw : (union in_addr_union) {};
|
||||
route->prefsrc = prefsrc ? *prefsrc : (union in_addr_union) {};
|
||||
route->gw = gw ? *gw : IN_ADDR_NULL;
|
||||
route->prefsrc = prefsrc ? *prefsrc : IN_ADDR_NULL;
|
||||
route->scope = scope;
|
||||
route->protocol = protocol;
|
||||
route->type = type;
|
||||
|
6
test/fuzz/fuzz-netdev-parser/oss-fuzz-11344
Normal file
6
test/fuzz/fuzz-netdev-parser/oss-fuzz-11344
Normal file
@ -0,0 +1,6 @@
|
||||
[NetDev]
|
||||
Name=v
|
||||
Kind=vti
|
||||
[Tunnel]
|
||||
Local=::
|
||||
Local=any
|
Loading…
Reference in New Issue
Block a user