mirror of
https://github.com/systemd/systemd.git
synced 2024-11-14 15:21:37 +03:00
sd-dhcp: fix test of magic cookie
The magic cookie is set in dhcp_message_init. Test the magic cookie value intead of writing the last 3/4 of it directly. Found with Coverity. Fixes: CID#1237732 CID#1237734 CID#1237735
This commit is contained in:
parent
d1c457badf
commit
86be3e1e65
@ -100,9 +100,9 @@ static void test_message_init(void)
|
||||
magic = (uint8_t*)&message->magic;
|
||||
|
||||
assert_se(magic[0] == 99);
|
||||
assert_se(magic[1] = 130);
|
||||
assert_se(magic[2] = 83);
|
||||
assert_se(magic[3] = 99);
|
||||
assert_se(magic[1] == 130);
|
||||
assert_se(magic[2] == 83);
|
||||
assert_se(magic[3] == 99);
|
||||
|
||||
assert_se(dhcp_option_parse(message, len, NULL, NULL) >= 0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user