mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 18:27:21 +00:00
Merge pull request #2534 from pacovn/Coverity_1470113_Untrusted_array_index_write
zebra: untrusted array index (2) (Coverity 1470113)
This commit is contained in:
commit
8394a34484
@ -212,7 +212,9 @@ static int zebra_ns_notify_read(struct thread *t)
|
|||||||
continue;
|
continue;
|
||||||
if (event->mask & IN_DELETE)
|
if (event->mask & IN_DELETE)
|
||||||
return zebra_ns_delete(event->name);
|
return zebra_ns_delete(event->name);
|
||||||
if (&event->name[event->len] >= &buf[sizeof(buf)]) {
|
|
||||||
|
if (offsetof(struct inotify_event, name) + event->len
|
||||||
|
>= sizeof(buf)) {
|
||||||
zlog_err("NS notify read: buffer underflow");
|
zlog_err("NS notify read: buffer underflow");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user