зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1439236: exit early if m_copym gets called with null ptr r=dminor
Cheery-picked upstream commit:
d89882d049
MozReview-Commit-ID: 36bYbfIaqEz
--HG--
extra : rebase_source : 334b13ec00e9d82346a2c6ebfdadaf87b6161406
This commit is contained in:
Родитель
68d7eca9b0
Коммит
bf1ee00dc5
|
@ -987,6 +987,13 @@ m_copym(struct mbuf *m, int off0, int len, int wait)
|
|||
|
||||
KASSERT(off >= 0, ("m_copym, negative off %d", off));
|
||||
KASSERT(len >= 0, ("m_copym, negative len %d", len));
|
||||
KASSERT(m != NULL, ("m_copym, m is NULL"));
|
||||
|
||||
#if !defined(INVARIANTS)
|
||||
if (m == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (off == 0 && m->m_flags & M_PKTHDR)
|
||||
copyhdr = 1;
|
||||
|
|
Загрузка…
Ссылка в новой задаче