History log of /freebsd-12.1/contrib/ipfilter/lib/parsefields.c (Results 1 – 3 of 3)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# c6fd01fb 16-Apr-2017 Cy Schubert <[email protected]>

Use warnx() to issue error message.

Reported by: cem
MFC after: 1 week
X-MFC with: r316993, r316994


# a07d9e9a 16-Apr-2017 Cy Schubert <[email protected]>

Fix CID 1372601, possible NULL pointer dereference should
reallocarray() fail.

Reported by: Coverity CID 1372601
MFC after: 1 week


# 3820c3aa 16-Mar-2017 Cy Schubert <[email protected]>

calloc() and realloc() modernization.

This commit replaces calloc calls, which called calloc() as if it were
malloc() by allocating a multiple of objects as a sizeof multiplied by
the number of obje

calloc() and realloc() modernization.

This commit replaces calloc calls, which called calloc() as if it were
malloc() by allocating a multiple of objects as a sizeof multiplied by
the number of objects. The patch rectifies this by calling calloc() as
it was meant to be called.

This commit also replaces realloc() with reallocarray() in a similar
fashion as above. Instead of calculating the memory to reallocated
(changed) by multiplying sizeof by the number of objects, the sizeof
and number are passed as separate arguments to reallocarray(), letting
reallocarray() do the multiplication instead. Like the calloc()
adjustment above, this is approach is cleaner and more elegant than
than the previous code.

This has been tested on my production firewall and a laptop (also
running ipfilter).

Submitted by: pfg
MFC after: 6 weeks

show more ...